Search in sources :

Example 1 with PrebuiltLibrary

use of org.gradle.nativeplatform.PrebuiltLibrary in project gradle by gradle.

the class PrebuiltLibraryBinaryLocator method getBinaries.

@Nullable
@Override
public DomainObjectSet<NativeLibraryBinary> getBinaries(LibraryIdentifier library) {
    ModelRegistry projectModel = projectModelResolver.resolveProjectModel(library.getProjectPath());
    Repositories repositories = projectModel.find("repositories", Repositories.class);
    if (repositories == null) {
        return null;
    }
    PrebuiltLibrary prebuiltLibrary = getPrebuiltLibrary(repositories.withType(PrebuiltLibraries.class), library.getLibraryName());
    return prebuiltLibrary != null ? prebuiltLibrary.getBinaries() : null;
}
Also used : Repositories(org.gradle.nativeplatform.Repositories) ModelRegistry(org.gradle.model.internal.registry.ModelRegistry) PrebuiltLibrary(org.gradle.nativeplatform.PrebuiltLibrary) PrebuiltLibraries(org.gradle.nativeplatform.PrebuiltLibraries) Nullable(javax.annotation.Nullable)

Aggregations

Nullable (javax.annotation.Nullable)1 ModelRegistry (org.gradle.model.internal.registry.ModelRegistry)1 PrebuiltLibraries (org.gradle.nativeplatform.PrebuiltLibraries)1 PrebuiltLibrary (org.gradle.nativeplatform.PrebuiltLibrary)1 Repositories (org.gradle.nativeplatform.Repositories)1