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);
}
}
Aggregations