use of org.gradle.api.artifacts.ExternalModuleDependency in project gradle by gradle.
the class DefaultDependencyHandler method enforcedPlatform.
@Override
@SuppressWarnings("deprecation")
public Dependency enforcedPlatform(Object notation) {
Dependency platformDependency = create(notation);
if (platformDependency instanceof ExternalModuleDependency) {
ExternalModuleDependency externalModuleDependency = (ExternalModuleDependency) platformDependency;
DeprecationLogger.whileDisabled(() -> externalModuleDependency.setForce(true));
platformSupport.addPlatformAttribute(externalModuleDependency, toCategory(Category.ENFORCED_PLATFORM));
} else if (platformDependency instanceof HasConfigurableAttributes) {
platformSupport.addPlatformAttribute((HasConfigurableAttributes<?>) platformDependency, toCategory(Category.ENFORCED_PLATFORM));
}
return platformDependency;
}
Aggregations