Search in sources :

Example 1 with JvmLibrarySpec

use of org.gradle.jvm.JvmLibrarySpec in project gradle by gradle.

the class JvmLocalLibraryMetaDataAdapter method createJarBinarySpecLocalComponentMetaData.

@SuppressWarnings("unchecked")
private void createJarBinarySpecLocalComponentMetaData(EnumMap<UsageKind, List<PublishArtifact>> artifacts, JarBinarySpecInternal jarBinarySpec, EnumMap<UsageKind, Iterable<DependencySpec>> dependenciesPerUsage, boolean toAssembly) {
    JarFile apiJar = jarBinarySpec.getApiJar();
    configureUsageMetadata(UsageKind.API, jarBinarySpec.getApiDependencies(), dependenciesPerUsage);
    JarFile runtimeJar = jarBinarySpec.getRuntimeJar();
    JvmLibrarySpec library = jarBinarySpec.getLibrary();
    configureUsageMetadata(UsageKind.RUNTIME, library != null ? collectDependencies(jarBinarySpec, library, library.getDependencies().getDependencies(), jarBinarySpec.getApiDependencies()) : Collections.<DependencySpec>emptyList(), dependenciesPerUsage);
    if (!toAssembly) {
        addArtifact(UsageKind.API, apiJar, artifacts);
        addArtifact(UsageKind.RUNTIME, runtimeJar, artifacts);
    }
}
Also used : JvmLibrarySpec(org.gradle.jvm.JvmLibrarySpec) DependencySpec(org.gradle.platform.base.DependencySpec) JarFile(org.gradle.jvm.internal.JarFile)

Aggregations

JvmLibrarySpec (org.gradle.jvm.JvmLibrarySpec)1 JarFile (org.gradle.jvm.internal.JarFile)1 DependencySpec (org.gradle.platform.base.DependencySpec)1