use of org.gradle.internal.component.external.model.ProjectDerivedCapability in project gradle by gradle.
the class DefaultJavaPluginExtension method registerFeature.
public void registerFeature(String name, Action<? super FeatureSpec> configureAction) {
Capability defaultCapability = new ProjectDerivedCapability(project, name);
DefaultJavaFeatureSpec spec = new DefaultJavaFeatureSpec(validateFeatureName(name), defaultCapability, jvmPluginServices);
configureAction.execute(spec);
spec.create();
}
use of org.gradle.internal.component.external.model.ProjectDerivedCapability 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);
}
use of org.gradle.internal.component.external.model.ProjectDerivedCapability in project gradle by gradle.
the class DefaultJvmPluginServices method createJvmVariant.
@Override
public void createJvmVariant(String name, Action<? super JvmVariantBuilder> configuration) {
DefaultJvmVariantBuilder builder = instanceGenerator.newInstance(DefaultJvmVariantBuilder.class, name, new ProjectDerivedCapability(project, name), this, sourceSets, configurations, tasks, components, project);
configuration.execute(builder);
builder.build();
}
Aggregations