use of org.gradle.api.publish.internal.versionmapping.VariantVersionMappingStrategyInternal in project gradle by gradle.
the class ModuleMetadataSpecBuilder method dependencyConstraintsFor.
private List<ModuleMetadataSpec.DependencyConstraint> dependencyConstraintsFor(UsageContext variant) {
if (variant.getDependencyConstraints().isEmpty()) {
return emptyList();
}
VariantVersionMappingStrategyInternal versionMappingStrategy = versionMappingStrategyFor(variant);
ArrayList<ModuleMetadataSpec.DependencyConstraint> dependencyConstraints = new ArrayList<>();
for (DependencyConstraint dependencyConstraint : variant.getDependencyConstraints()) {
dependencyConstraints.add(dependencyConstraintFor(dependencyConstraint, versionMappingStrategy, variant.getName()));
}
return dependencyConstraints;
}
use of org.gradle.api.publish.internal.versionmapping.VariantVersionMappingStrategyInternal in project gradle by gradle.
the class ModuleMetadataSpecBuilder method dependenciesOf.
private List<ModuleMetadataSpec.Dependency> dependenciesOf(UsageContext variant) {
if (variant.getDependencies().isEmpty()) {
return emptyList();
}
ArrayList<ModuleMetadataSpec.Dependency> dependencies = new ArrayList<>();
Set<ExcludeRule> additionalExcludes = variant.getGlobalExcludes();
VariantVersionMappingStrategyInternal versionMappingStrategy = versionMappingStrategyFor(variant);
for (ModuleDependency moduleDependency : variant.getDependencies()) {
if (moduleDependency.getArtifacts().isEmpty()) {
dependencies.add(dependencyFor(moduleDependency, additionalExcludes, versionMappingStrategy, null, variant.getName()));
} else {
for (DependencyArtifact dependencyArtifact : moduleDependency.getArtifacts()) {
dependencies.add(dependencyFor(moduleDependency, additionalExcludes, versionMappingStrategy, dependencyArtifact, variant.getName()));
}
}
}
return dependencies;
}
Aggregations