use of org.gradle.internal.component.external.model.DefaultShadowedCapability in project gradle by gradle.
the class JavaPlatformPlugin method createConfigurations.
private void createConfigurations(Project project) {
ConfigurationContainer configurations = project.getConfigurations();
Capability enforcedCapability = new DefaultShadowedCapability(new ProjectDerivedCapability(project), "-derived-enforced-platform");
Configuration api = configurations.create(API_CONFIGURATION_NAME, AS_BUCKET);
Configuration apiElements = createConsumableApi(project, configurations, api, API_ELEMENTS_CONFIGURATION_NAME, Category.REGULAR_PLATFORM);
Configuration enforcedApiElements = createConsumableApi(project, configurations, api, ENFORCED_API_ELEMENTS_CONFIGURATION_NAME, Category.ENFORCED_PLATFORM);
enforcedApiElements.getOutgoing().capability(enforcedCapability);
Configuration runtime = project.getConfigurations().create(RUNTIME_CONFIGURATION_NAME, AS_BUCKET);
runtime.extendsFrom(api);
Configuration runtimeElements = createConsumableRuntime(project, runtime, RUNTIME_ELEMENTS_CONFIGURATION_NAME, Category.REGULAR_PLATFORM);
Configuration enforcedRuntimeElements = createConsumableRuntime(project, runtime, ENFORCED_RUNTIME_ELEMENTS_CONFIGURATION_NAME, Category.ENFORCED_PLATFORM);
enforcedRuntimeElements.getOutgoing().capability(enforcedCapability);
Configuration classpath = configurations.create(CLASSPATH_CONFIGURATION_NAME, AS_RESOLVABLE_CONFIGURATION);
classpath.extendsFrom(runtimeElements);
declareConfigurationUsage(project.getObjects(), classpath, Usage.JAVA_RUNTIME, LibraryElements.JAR);
createSoftwareComponent(project, apiElements, runtimeElements);
}
Aggregations