Merge branch '2.4.x'
This commit is contained in:
commit
5258c26f90
|
|
@ -104,7 +104,7 @@ final class JavaPluginAction implements PluginApplicationAction {
|
||||||
Configuration developmentOnly = project.getConfigurations()
|
Configuration developmentOnly = project.getConfigurations()
|
||||||
.getByName(SpringBootPlugin.DEVELOPMENT_ONLY_CONFIGURATION_NAME);
|
.getByName(SpringBootPlugin.DEVELOPMENT_ONLY_CONFIGURATION_NAME);
|
||||||
Configuration productionRuntimeClasspath = project.getConfigurations()
|
Configuration productionRuntimeClasspath = project.getConfigurations()
|
||||||
.getByName(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_NAME);
|
.getByName(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_CONFIGURATION_NAME);
|
||||||
FileCollection classpath = mainSourceSet.getRuntimeClasspath()
|
FileCollection classpath = mainSourceSet.getRuntimeClasspath()
|
||||||
.minus((developmentOnly.minus(productionRuntimeClasspath))).filter(new JarTypeFileSpec());
|
.minus((developmentOnly.minus(productionRuntimeClasspath))).filter(new JarTypeFileSpec());
|
||||||
TaskProvider<ResolveMainClassName> resolveMainClassName = ResolveMainClassName
|
TaskProvider<ResolveMainClassName> resolveMainClassName = ResolveMainClassName
|
||||||
|
|
@ -213,7 +213,7 @@ final class JavaPluginAction implements PluginApplicationAction {
|
||||||
Configuration runtimeClasspath = project.getConfigurations()
|
Configuration runtimeClasspath = project.getConfigurations()
|
||||||
.getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);
|
.getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);
|
||||||
Configuration productionRuntimeClasspath = project.getConfigurations()
|
Configuration productionRuntimeClasspath = project.getConfigurations()
|
||||||
.create(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_NAME);
|
.create(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_CONFIGURATION_NAME);
|
||||||
AttributeContainer attributes = productionRuntimeClasspath.getAttributes();
|
AttributeContainer attributes = productionRuntimeClasspath.getAttributes();
|
||||||
ObjectFactory objectFactory = project.getObjects();
|
ObjectFactory objectFactory = project.getObjects();
|
||||||
attributes.attribute(Usage.USAGE_ATTRIBUTE, objectFactory.named(Usage.class, Usage.JAVA_RUNTIME));
|
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.
|
* 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
|
* The coordinates {@code (group:name:version)} of the
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ class WarPluginAction implements PluginApplicationAction {
|
||||||
Configuration developmentOnly = project.getConfigurations()
|
Configuration developmentOnly = project.getConfigurations()
|
||||||
.getByName(SpringBootPlugin.DEVELOPMENT_ONLY_CONFIGURATION_NAME);
|
.getByName(SpringBootPlugin.DEVELOPMENT_ONLY_CONFIGURATION_NAME);
|
||||||
Configuration productionRuntimeClasspath = project.getConfigurations()
|
Configuration productionRuntimeClasspath = project.getConfigurations()
|
||||||
.getByName(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_NAME);
|
.getByName(SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_CONFIGURATION_NAME);
|
||||||
FileCollection classpath = project.getConvention().getByType(SourceSetContainer.class)
|
FileCollection classpath = project.getConvention().getByType(SourceSetContainer.class)
|
||||||
.getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath()
|
.getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath()
|
||||||
.minus(providedRuntimeConfiguration(project)).minus((developmentOnly.minus(productionRuntimeClasspath)))
|
.minus(providedRuntimeConfiguration(project)).minus((developmentOnly.minus(productionRuntimeClasspath)))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue