Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
75693c1
commit f11ddb4
Showing
12 changed files
with
165 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...t/gradle/plugin/ApplicationPluginActionIntegrationTests-taskConfigurationIsAvoided.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
id 'java' | ||
id 'application' | ||
} | ||
|
||
tasks.configureEach { | ||
println "Configuring ${it.path}" | ||
} |
8 changes: 8 additions & 0 deletions
8
...ork/boot/gradle/plugin/JavaPluginActionIntegrationTests-taskConfigurationIsAvoided.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
id 'java' | ||
} | ||
|
||
tasks.configureEach { | ||
println "Configuring ${it.path}" | ||
} |
9 changes: 9 additions & 0 deletions
9
...k/boot/gradle/plugin/KotlinPluginActionIntegrationTests-taskConfigurationIsAvoided.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
} | ||
|
||
apply plugin: 'org.jetbrains.kotlin.jvm' | ||
|
||
tasks.configureEach { | ||
println "Configuring ${it.path}" | ||
} |
8 changes: 8 additions & 0 deletions
8
...work/boot/gradle/plugin/WarPluginActionIntegrationTests-taskConfigurationIsAvoided.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
id 'war' | ||
} | ||
|
||
tasks.configureEach { | ||
println "Configuring ${it.path}" | ||
} |