Prevent eager creation of bootWar task
Previously, querying the artifact's extension in SinglePublishedArtifact would result in eager creation of the task that creates the artifact. Typically, this is the bootWar task. Instead of querying the extension, this commit reworks SinglePublishedArtifact and its callers to call separate methods for jar and war artifacts so that the extension check is no longer required. Tests have been added to ensure that running help does not trigger any unexpected task creation. The tests' assertions tolerate some variation in behavior that depend on the version of Gradle and whether the configuration cache is enabled. Closes gh-30211
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
id 'java'
|
||||
id 'application'
|
||||
}
|
||||
|
||||
tasks.configureEach {
|
||||
println "Configuring ${it.path}"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
id 'java'
|
||||
}
|
||||
|
||||
tasks.configureEach {
|
||||
println "Configuring ${it.path}"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
}
|
||||
|
||||
apply plugin: 'org.jetbrains.kotlin.jvm'
|
||||
|
||||
tasks.configureEach {
|
||||
println "Configuring ${it.path}"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
id 'war'
|
||||
}
|
||||
|
||||
tasks.configureEach {
|
||||
println "Configuring ${it.path}"
|
||||
}
|
||||
Reference in New Issue
Block a user