Rename PRODUCTION_RUNTIME_CLASSPATH_NAME

Rename the now public constant for consistency with the JavaPlugin.

See gh-26686
pull/26691/head
Phillip Webb 4 years ago
parent 1e0ae9d5e3
commit 49c30854af

@ -102,7 +102,7 @@ final class JavaPluginAction implements PluginApplicationAction {
Configuration developmentOnly = project.getConfigurations()
.getByName(SpringBootPlugin.DEVELOPMENT_ONLY_CONFIGURATION_NAME);
Configuration productionRuntimeClasspath = project.getConfigurations()
.getByName(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_NAME);
.getByName(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_CONFIGURATION_NAME);
FileCollection classpath = mainSourceSet.getRuntimeClasspath()
.minus((developmentOnly.minus(productionRuntimeClasspath))).filter(new JarTypeFileSpec());
TaskProvider<ResolveMainClassName> resolveMainClassName = ResolveMainClassName
@ -211,7 +211,7 @@ final class JavaPluginAction implements PluginApplicationAction {
Configuration runtimeClasspath = project.getConfigurations()
.getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);
Configuration productionRuntimeClasspath = project.getConfigurations()
.create(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_NAME);
.create(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_CONFIGURATION_NAME);
AttributeContainer attributes = productionRuntimeClasspath.getAttributes();
ObjectFactory objectFactory = project.getObjects();
attributes.attribute(Usage.USAGE_ATTRIBUTE, objectFactory.named(Usage.class, Usage.JAVA_RUNTIME));

@ -78,9 +78,8 @@ public class SpringBootPlugin implements Plugin<Project> {
/**
* The name of the {@code productionRuntimeClasspath} configuration.
* @since 2.4.7
*/
public static final String PRODUCTION_RUNTIME_CLASSPATH_NAME = "productionRuntimeClasspath";
public static final String PRODUCTION_RUNTIME_CLASSPATH_CONFIGURATION_NAME = "productionRuntimeClasspath";
/**
* The coordinates {@code (group:name:version)} of the

@ -74,7 +74,7 @@ class WarPluginAction implements PluginApplicationAction {
Configuration developmentOnly = project.getConfigurations()
.getByName(SpringBootPlugin.DEVELOPMENT_ONLY_CONFIGURATION_NAME);
Configuration productionRuntimeClasspath = project.getConfigurations()
.getByName(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_NAME);
.getByName(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_CONFIGURATION_NAME);
FileCollection classpath = project.getConvention().getByType(SourceSetContainer.class)
.getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath()
.minus(providedRuntimeConfiguration(project)).minus((developmentOnly.minus(productionRuntimeClasspath)))

Loading…
Cancel
Save