Update BootWar to support Gradle's configuration cache
See gh-22922
This commit is contained in:
@@ -23,7 +23,7 @@ import org.springframework.boot.gradle.junit.GradleCompatibility;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@GradleCompatibility
|
||||
@GradleCompatibility(configurationCache = true)
|
||||
class BootWarIntegrationTests extends AbstractBootArchiveIntegrationTests {
|
||||
|
||||
BootWarIntegrationTests() {
|
||||
|
||||
@@ -4,4 +4,4 @@ plugins {
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
}
|
||||
|
||||
mainClassName = 'com.example.CustomMain'
|
||||
mainClass = 'com.example.CustomMain'
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
plugins {
|
||||
id 'war'
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
}
|
||||
|
||||
bootWar {
|
||||
mainClass = 'com.example.Application'
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
plugins {
|
||||
id 'war'
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
}
|
||||
|
||||
bootWar {
|
||||
mainClass = 'com.example.CustomMain'
|
||||
duplicatesStrategy = "exclude"
|
||||
}
|
||||
|
||||
configurations {
|
||||
provided
|
||||
}
|
||||
|
||||
sourceSets.all {
|
||||
compileClasspath += configurations.provided
|
||||
runtimeClasspath += configurations.provided
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.apache.commons:commons-lang3:3.6")
|
||||
provided "org.apache.commons:commons-lang3:3.6"
|
||||
}
|
||||
@@ -4,7 +4,7 @@ plugins {
|
||||
}
|
||||
|
||||
bootWar {
|
||||
mainClassName = 'com.example.Application'
|
||||
mainClass = 'com.example.Application'
|
||||
launchScript {
|
||||
properties 'prop' : '{launchScriptProperty}'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@ plugins {
|
||||
}
|
||||
|
||||
bootWar {
|
||||
mainClassName = 'com.example.Application'
|
||||
mainClass = 'com.example.Application'
|
||||
{launchScript}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@ plugins {
|
||||
}
|
||||
|
||||
bootWar {
|
||||
mainClassName = 'com.example.Application'
|
||||
mainClass = 'com.example.Application'
|
||||
{launchScript}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
plugins {
|
||||
id 'war'
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
}
|
||||
|
||||
bootWar {
|
||||
mainClass = 'com.example.Application'
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
plugins {
|
||||
id 'war'
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
}
|
||||
|
||||
bootWar {
|
||||
mainClass = 'com.example.Application'
|
||||
launchScript()
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
plugins {
|
||||
id 'war'
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
}
|
||||
|
||||
bootWar {
|
||||
mainClass = 'com.example.Application'
|
||||
if (project.hasProperty('includeLaunchScript') ? includeLaunchScript : false) {
|
||||
launchScript {
|
||||
properties 'prop' : project.hasProperty('launchScriptProperty') ? launchScriptProperty : 'default'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user