use of org.gradle.api.capabilities.Capability in project gradle by gradle.
the class ModuleMetadataFileGenerator method writeCapabilities.
private void writeCapabilities(UsageContext variant, JsonWriter jsonWriter) throws IOException {
Set<? extends Capability> capabilities = variant.getCapabilities();
if (!capabilities.isEmpty()) {
jsonWriter.name("capabilities");
jsonWriter.beginArray();
for (Capability capability : capabilities) {
jsonWriter.beginObject();
jsonWriter.name("group").value(capability.getGroup());
jsonWriter.name("name").value(capability.getName());
jsonWriter.name("version").value(capability.getVersion());
jsonWriter.endObject();
}
jsonWriter.endArray();
}
}
Aggregations