use of org.gradle.nativeplatform.NativeBinarySpec in project gradle by gradle.
the class ProjectLibraryBinaryLocator method getBinaries.
// Converts the binaries of a project library into regular binary instances
@Nullable
@Override
public DomainObjectSet<NativeLibraryBinary> getBinaries(LibraryIdentifier libraryIdentifier) {
ModelRegistry projectModel = projectModelResolver.resolveProjectModel(libraryIdentifier.getProjectPath());
ComponentSpecContainer components = projectModel.find("components", ComponentSpecContainer.class);
if (components == null) {
return null;
}
String libraryName = libraryIdentifier.getLibraryName();
NativeLibrarySpec library = components.withType(NativeLibrarySpec.class).get(libraryName);
if (library == null) {
return null;
}
ModelMap<NativeBinarySpec> projectBinaries = library.getBinaries().withType(NativeBinarySpec.class);
DomainObjectSet<NativeLibraryBinary> binaries = domainObjectCollectionFactory.newDomainObjectSet(NativeLibraryBinary.class);
for (NativeBinarySpec nativeBinarySpec : projectBinaries.values()) {
binaries.add((NativeLibraryBinary) nativeBinarySpec);
}
return binaries;
}
use of org.gradle.nativeplatform.NativeBinarySpec in project gradle by gradle.
the class NativeTestSuiteBinaryRenderer method renderDetails.
@Override
protected void renderDetails(NativeTestSuiteBinarySpec binary, TextReportBuilder builder) {
NativeTestSuiteSpec testSuite = binary.getTestSuite();
NativeComponentSpec testedComponent = testSuite.getTestedComponent();
if (testedComponent != null) {
builder.item("component under test", testedComponent.getDisplayName());
}
NativeBinarySpec testedBinary = binary.getTestedBinary();
if (testedBinary != null) {
builder.item("binary under test", testedBinary.getDisplayName());
}
super.renderDetails(binary, builder);
}
Aggregations