Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
081ef2d9
Commit
081ef2d9
authored
Oct 01, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update BootJar to support Gradle's configuration cache
See gh-22922
parent
c8285219
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
160 additions
and
48 deletions
+160
-48
BootJar.java
...g/springframework/boot/gradle/tasks/bundling/BootJar.java
+20
-1
AbstractBootArchiveIntegrationTests.java
...e/tasks/bundling/AbstractBootArchiveIntegrationTests.java
+8
-10
BootJarIntegrationTests.java
...k/boot/gradle/tasks/bundling/BootJarIntegrationTests.java
+15
-18
BootWarIntegrationTests.java
...k/boot/gradle/tasks/bundling/BootWarIntegrationTests.java
+3
-0
BootJarIntegrationTests-basicBuild.gradle
.../tasks/bundling/BootJarIntegrationTests-basicBuild.gradle
+8
-0
BootJarIntegrationTests-notUpToDateWhenBuiltWithLayerToolsAndThenWithoutLayerTools.gradle
...ateWhenBuiltWithLayerToolsAndThenWithoutLayerTools.gradle
+11
-0
BootJarIntegrationTests-notUpToDateWhenBuiltWithoutLayersAndThenWithLayers.gradle
...notUpToDateWhenBuiltWithoutLayersAndThenWithLayers.gradle
+11
-0
BootJarIntegrationTests-notUpToDateWhenLaunchScriptPropertyChanges.gradle
...onTests-notUpToDateWhenLaunchScriptPropertyChanges.gradle
+11
-0
BootJarIntegrationTests-notUpToDateWhenLaunchScriptWasIncludedAndThenIsNotIncluded.gradle
...ateWhenLaunchScriptWasIncludedAndThenIsNotIncluded.gradle
+9
-0
BootJarIntegrationTests-notUpToDateWhenLaunchScriptWasNotIncludedAndThenIsIncluded.gradle
...ateWhenLaunchScriptWasNotIncludedAndThenIsIncluded.gradle
+9
-0
BootJarIntegrationTests-upToDateWhenBuiltTwice.gradle
...ing/BootJarIntegrationTests-upToDateWhenBuiltTwice.gradle
+8
-0
BootJarIntegrationTests-upToDateWhenBuiltTwiceWithLaunchScriptIncluded.gradle
...sts-upToDateWhenBuiltTwiceWithLaunchScriptIncluded.gradle
+9
-0
BootJarIntegrationTests-upToDateWhenBuiltWithDefaultLayeredAndThenWithExplicitLayered.gradle
...nBuiltWithDefaultLayeredAndThenWithExplicitLayered.gradle
+9
-0
BootJarIntegrationTests.gradle
...boot/gradle/tasks/bundling/BootJarIntegrationTests.gradle
+0
-19
BootWarIntegrationTests-notUpToDateWhenLaunchScriptPropertyChanges.gradle
...onTests-notUpToDateWhenLaunchScriptPropertyChanges.gradle
+11
-0
BootWarIntegrationTests-notUpToDateWhenLaunchScriptWasIncludedAndThenIsNotIncluded.gradle
...ateWhenLaunchScriptWasIncludedAndThenIsNotIncluded.gradle
+9
-0
BootWarIntegrationTests-notUpToDateWhenLaunchScriptWasNotIncludedAndThenIsIncluded.gradle
...ateWhenLaunchScriptWasNotIncludedAndThenIsIncluded.gradle
+9
-0
No files found.
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java
View file @
081ef2d9
...
@@ -19,6 +19,7 @@ package org.springframework.boot.gradle.tasks.bundling;
...
@@ -19,6 +19,7 @@ package org.springframework.boot.gradle.tasks.bundling;
import
java.io.File
;
import
java.io.File
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Callable
;
import
java.util.function.Function
;
import
org.gradle.api.Action
;
import
org.gradle.api.Action
;
import
org.gradle.api.Project
;
import
org.gradle.api.Project
;
...
@@ -72,7 +73,7 @@ public class BootJar extends Jar implements BootArchive {
...
@@ -72,7 +73,7 @@ public class BootJar extends Jar implements BootArchive {
* Creates a new {@code BootJar} task.
* Creates a new {@code BootJar} task.
*/
*/
public
BootJar
()
{
public
BootJar
()
{
this
.
support
=
new
BootArchiveSupport
(
LAUNCHER
,
this
::
isLibrary
,
this
::
resolveZipCompression
);
this
.
support
=
new
BootArchiveSupport
(
LAUNCHER
,
new
LibrarySpec
(),
new
ZipCompressionResolver
()
);
this
.
bootInfSpec
=
getProject
().
copySpec
().
into
(
"BOOT-INF"
);
this
.
bootInfSpec
=
getProject
().
copySpec
().
into
(
"BOOT-INF"
);
this
.
mainClass
=
getProject
().
getObjects
().
property
(
String
.
class
);
this
.
mainClass
=
getProject
().
getObjects
().
property
(
String
.
class
);
configureBootInfSpec
(
this
.
bootInfSpec
);
configureBootInfSpec
(
this
.
bootInfSpec
);
...
@@ -325,4 +326,22 @@ public class BootJar extends Jar implements BootArchive {
...
@@ -325,4 +326,22 @@ public class BootJar extends Jar implements BootArchive {
return
this
.
resolvedDependencies
;
return
this
.
resolvedDependencies
;
}
}
private
final
class
LibrarySpec
implements
Spec
<
FileCopyDetails
>
{
@Override
public
boolean
isSatisfiedBy
(
FileCopyDetails
details
)
{
return
isLibrary
(
details
);
}
}
private
final
class
ZipCompressionResolver
implements
Function
<
FileCopyDetails
,
ZipCompression
>
{
@Override
public
ZipCompression
apply
(
FileCopyDetails
details
)
{
return
resolveZipCompression
(
details
);
}
}
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java
View file @
081ef2d9
...
@@ -32,7 +32,6 @@ import org.gradle.testkit.runner.TaskOutcome;
...
@@ -32,7 +32,6 @@ import org.gradle.testkit.runner.TaskOutcome;
import
org.gradle.testkit.runner.UnexpectedBuildFailure
;
import
org.gradle.testkit.runner.UnexpectedBuildFailure
;
import
org.junit.jupiter.api.TestTemplate
;
import
org.junit.jupiter.api.TestTemplate
;
import
org.springframework.boot.gradle.junit.GradleCompatibility
;
import
org.springframework.boot.gradle.testkit.GradleBuild
;
import
org.springframework.boot.gradle.testkit.GradleBuild
;
import
org.springframework.boot.loader.tools.FileUtils
;
import
org.springframework.boot.loader.tools.FileUtils
;
...
@@ -43,7 +42,6 @@ import static org.assertj.core.api.Assertions.assertThat;
...
@@ -43,7 +42,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
*
* @author Andy Wilkinson
* @author Andy Wilkinson
*/
*/
@GradleCompatibility
abstract
class
AbstractBootArchiveIntegrationTests
{
abstract
class
AbstractBootArchiveIntegrationTests
{
private
final
String
taskName
;
private
final
String
taskName
;
...
@@ -99,25 +97,25 @@ abstract class AbstractBootArchiveIntegrationTests {
...
@@ -99,25 +97,25 @@ abstract class AbstractBootArchiveIntegrationTests {
@TestTemplate
@TestTemplate
void
notUpToDateWhenLaunchScriptWasNotIncludedAndThenIsIncluded
()
{
void
notUpToDateWhenLaunchScriptWasNotIncludedAndThenIsIncluded
()
{
assertThat
(
this
.
gradleBuild
.
build
(
this
.
taskName
).
task
(
":"
+
this
.
taskName
).
getOutcome
())
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"launchScript"
,
""
).
build
(
this
.
taskName
).
task
(
":"
+
this
.
taskName
)
.
isEqualTo
(
TaskOutcome
.
SUCCESS
);
assertThat
(
this
.
gradleBuild
.
build
(
"-PincludeLaunchScript=true"
,
this
.
taskName
).
task
(
":"
+
this
.
taskName
)
.
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
.
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"launchScript"
,
"launchScript()"
).
build
(
this
.
taskName
)
.
task
(
":"
+
this
.
taskName
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
}
}
@TestTemplate
@TestTemplate
void
notUpToDateWhenLaunchScriptWasIncludedAndThenIsNotIncluded
()
{
void
notUpToDateWhenLaunchScriptWasIncludedAndThenIsNotIncluded
()
{
assertThat
(
this
.
gradleBuild
.
build
(
this
.
taskName
).
task
(
":"
+
this
.
taskName
).
getOutcome
()
)
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"launchScript"
,
"launchScript()"
).
build
(
this
.
taskName
)
.
isEqualTo
(
TaskOutcome
.
SUCCESS
);
.
task
(
":"
+
this
.
taskName
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
assertThat
(
this
.
gradleBuild
.
build
(
"-PincludeLaunchScript=true"
,
this
.
taskName
).
task
(
":"
+
this
.
taskName
)
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"launchScript"
,
""
).
build
(
this
.
taskName
).
task
(
":"
+
this
.
taskName
)
.
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
.
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
}
}
@TestTemplate
@TestTemplate
void
notUpToDateWhenLaunchScriptPropertyChanges
()
{
void
notUpToDateWhenLaunchScriptPropertyChanges
()
{
assertThat
(
this
.
gradleBuild
.
build
(
"-PincludeLaunchScript=true"
,
"-PlaunchScriptProperty=foo"
,
this
.
taskName
)
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"launchScriptProperty"
,
"alpha"
).
build
(
this
.
taskName
)
.
task
(
":"
+
this
.
taskName
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
.
task
(
":"
+
this
.
taskName
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
assertThat
(
this
.
gradleBuild
.
build
(
"-PincludeLaunchScript=true"
,
"-PlaunchScriptProperty=bar"
,
this
.
taskName
)
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"launchScriptProperty"
,
"bravo"
).
build
(
this
.
taskName
)
.
task
(
":"
+
this
.
taskName
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
.
task
(
":"
+
this
.
taskName
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests.java
View file @
081ef2d9
...
@@ -43,6 +43,7 @@ import org.gradle.testkit.runner.TaskOutcome;
...
@@ -43,6 +43,7 @@ import org.gradle.testkit.runner.TaskOutcome;
import
org.gradle.testkit.runner.UnexpectedBuildFailure
;
import
org.gradle.testkit.runner.UnexpectedBuildFailure
;
import
org.junit.jupiter.api.TestTemplate
;
import
org.junit.jupiter.api.TestTemplate
;
import
org.springframework.boot.gradle.junit.GradleCompatibility
;
import
org.springframework.boot.loader.tools.JarModeLibrary
;
import
org.springframework.boot.loader.tools.JarModeLibrary
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
...
@@ -55,43 +56,39 @@ import static org.assertj.core.api.Assertions.assertThat;
...
@@ -55,43 +56,39 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Madhura Bhave
* @author Madhura Bhave
* @author Paddy Drury
* @author Paddy Drury
*/
*/
@GradleCompatibility
(
configurationCache
=
true
)
class
BootJarIntegrationTests
extends
AbstractBootArchiveIntegrationTests
{
class
BootJarIntegrationTests
extends
AbstractBootArchiveIntegrationTests
{
BootJarIntegrationTests
()
{
BootJarIntegrationTests
()
{
super
(
"bootJar"
,
"BOOT-INF/lib/"
,
"BOOT-INF/classes/"
);
super
(
"bootJar"
,
"BOOT-INF/lib/"
,
"BOOT-INF/classes/"
);
}
}
@TestTemplate
void
upToDateWhenBuiltTwiceWithLayers
()
throws
InvalidRunnerConfigurationException
,
UnexpectedBuildFailure
{
assertThat
(
this
.
gradleBuild
.
build
(
"-PcustomizeLayered=true"
,
"bootJar"
).
task
(
":bootJar"
).
getOutcome
())
.
isEqualTo
(
TaskOutcome
.
SUCCESS
);
assertThat
(
this
.
gradleBuild
.
build
(
"-PcustomizeLayered=true"
,
"bootJar"
).
task
(
":bootJar"
).
getOutcome
())
.
isEqualTo
(
TaskOutcome
.
UP_TO_DATE
);
}
@TestTemplate
@TestTemplate
void
upToDateWhenBuiltWithDefaultLayeredAndThenWithExplicitLayered
()
void
upToDateWhenBuiltWithDefaultLayeredAndThenWithExplicitLayered
()
throws
InvalidRunnerConfigurationException
,
UnexpectedBuildFailure
{
throws
InvalidRunnerConfigurationException
,
UnexpectedBuildFailure
{
assertThat
(
this
.
gradleBuild
.
build
(
"bootJar"
).
task
(
":bootJar"
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"layered"
,
""
).
build
(
"bootJar"
).
task
(
":bootJar"
).
getOutcome
())
assertThat
(
this
.
gradleBuild
.
build
(
"-PcustomizeLayered=true"
,
"bootJar"
).
task
(
":bootJar"
).
getOutcome
())
.
isEqualTo
(
TaskOutcome
.
SUCCESS
);
.
isEqualTo
(
TaskOutcome
.
UP_TO_DATE
);
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"layered"
,
"layered {}"
).
build
(
"bootJar"
).
task
(
":bootJar"
).
getOutcome
())
.
isEqualTo
(
TaskOutcome
.
UP_TO_DATE
);
}
}
@TestTemplate
@TestTemplate
void
notUpToDateWhenBuiltWithoutLayersAndThenWithLayers
()
void
notUpToDateWhenBuiltWithoutLayersAndThenWithLayers
()
throws
InvalidRunnerConfigurationException
,
UnexpectedBuildFailure
{
throws
InvalidRunnerConfigurationException
,
UnexpectedBuildFailure
{
assertThat
(
this
.
gradleBuild
.
build
(
"-PcustomizeLayered=true"
,
"-PdisableLayers=true"
,
"bootJar"
).
task
(
":
bootJar"
)
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"layerEnablement"
,
"enabled = false"
).
build
(
"
bootJar"
)
.
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
.
task
(
":bootJar"
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
assertThat
(
this
.
gradleBuild
.
build
(
"-PcustomizeLayered=true"
,
"bootJar"
).
task
(
":bootJar"
).
getOutcome
()
)
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"layerEnablement"
,
"enabled = true"
).
build
(
"bootJar"
)
.
isEqualTo
(
TaskOutcome
.
SUCCESS
);
.
task
(
":bootJar"
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
}
}
@TestTemplate
@TestTemplate
void
notUpToDateWhenBuiltWithLayerToolsAndThenWithoutLayerTools
()
void
notUpToDateWhenBuiltWithLayerToolsAndThenWithoutLayerTools
()
throws
InvalidRunnerConfigurationException
,
UnexpectedBuildFailure
{
throws
InvalidRunnerConfigurationException
,
UnexpectedBuildFailure
{
assertThat
(
this
.
gradleBuild
.
build
(
"bootJar"
).
task
(
":bootJar"
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"layerTools"
,
""
).
build
(
"bootJar"
).
task
(
":bootJar"
).
getOutcome
())
assertThat
(
this
.
gradleBuild
.
build
(
"-PcustomizeLayered=true"
,
"-PexcludeTools=true"
,
"bootJar"
).
task
(
":bootJar"
)
.
isEqualTo
(
TaskOutcome
.
SUCCESS
);
.
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
assertThat
(
this
.
gradleBuild
.
scriptProperty
(
"layerTools"
,
"includeLayerTools = false"
).
build
(
"bootJar"
)
.
task
(
":bootJar"
).
getOutcome
()).
isEqualTo
(
TaskOutcome
.
SUCCESS
);
}
}
@TestTemplate
@TestTemplate
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests.java
View file @
081ef2d9
...
@@ -16,11 +16,14 @@
...
@@ -16,11 +16,14 @@
package
org
.
springframework
.
boot
.
gradle
.
tasks
.
bundling
;
package
org
.
springframework
.
boot
.
gradle
.
tasks
.
bundling
;
import
org.springframework.boot.gradle.junit.GradleCompatibility
;
/**
/**
* Integration tests for {@link BootJar}.
* Integration tests for {@link BootJar}.
*
*
* @author Andy Wilkinson
* @author Andy Wilkinson
*/
*/
@GradleCompatibility
class
BootWarIntegrationTests
extends
AbstractBootArchiveIntegrationTests
{
class
BootWarIntegrationTests
extends
AbstractBootArchiveIntegrationTests
{
BootWarIntegrationTests
()
{
BootWarIntegrationTests
()
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-basicBuild.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'java'
id
'org.springframework.boot'
version
'{version}'
}
bootJar
{
mainClass
=
'com.example.Application'
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-notUpToDateWhenBuiltWithLayerToolsAndThenWithoutLayerTools.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'java'
id
'org.springframework.boot'
version
'{version}'
}
bootJar
{
mainClass
=
'com.example.Application'
layered
{
{
layerTools
}
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-notUpToDateWhenBuiltWithoutLayersAndThenWithLayers.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'java'
id
'org.springframework.boot'
version
'{version}'
}
bootJar
{
mainClass
=
'com.example.Application'
layered
{
{
layerEnablement
}
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-notUpToDateWhenLaunchScriptPropertyChanges.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'java'
id
'org.springframework.boot'
version
'{version}'
}
bootJar
{
mainClass
=
'com.example.Application'
launchScript
{
properties
'prop'
:
'{launchScriptProperty}'
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-notUpToDateWhenLaunchScriptWasIncludedAndThenIsNotIncluded.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'java'
id
'org.springframework.boot'
version
'{version}'
}
bootJar
{
mainClass
=
'com.example.Application'
{
launchScript
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-notUpToDateWhenLaunchScriptWasNotIncludedAndThenIsIncluded.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'java'
id
'org.springframework.boot'
version
'{version}'
}
bootJar
{
mainClass
=
'com.example.Application'
{
launchScript
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-upToDateWhenBuiltTwice.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'java'
id
'org.springframework.boot'
version
'{version}'
}
bootJar
{
mainClass
=
'com.example.Application'
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-upToDateWhenBuiltTwiceWithLaunchScriptIncluded.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'java'
id
'org.springframework.boot'
version
'{version}'
}
bootJar
{
mainClassName
=
'com.example.Application'
launchScript
()
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-upToDateWhenBuiltWithDefaultLayeredAndThenWithExplicitLayered.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'java'
id
'org.springframework.boot'
version
'{version}'
}
bootJar
{
mainClass
=
'com.example.Application'
{
layered
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests.gradle
deleted
100644 → 0
View file @
c8285219
plugins
{
id
'java'
id
'org.springframework.boot'
version
'{version}'
}
bootJar
{
mainClass
=
'com.example.Application'
if
(
project
.
hasProperty
(
'includeLaunchScript'
)
?
includeLaunchScript
:
false
)
{
launchScript
{
properties
'prop'
:
project
.
hasProperty
(
'launchScriptProperty'
)
?
launchScriptProperty
:
'default'
}
}
if
(
project
.
hasProperty
(
'customizeLayered'
)
&&
project
.
getProperty
(
'customizeLayered'
))
{
layered
{
includeLayerTools
=
project
.
hasProperty
(
'excludeTools'
)
&&
project
.
getProperty
(
'excludeTools'
)
?
false
:
true
enabled
=
project
.
hasProperty
(
'disableLayers'
)
&&
project
.
getProperty
(
'disableLayers'
)
?
false
:
true
}
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests-notUpToDateWhenLaunchScriptPropertyChanges.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'war'
id
'org.springframework.boot'
version
'{version}'
}
bootWar
{
mainClassName
=
'com.example.Application'
launchScript
{
properties
'prop'
:
'{launchScriptProperty}'
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests-notUpToDateWhenLaunchScriptWasIncludedAndThenIsNotIncluded.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'war'
id
'org.springframework.boot'
version
'{version}'
}
bootWar
{
mainClassName
=
'com.example.Application'
{
launchScript
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests-notUpToDateWhenLaunchScriptWasNotIncludedAndThenIsIncluded.gradle
0 → 100644
View file @
081ef2d9
plugins
{
id
'war'
id
'org.springframework.boot'
version
'{version}'
}
bootWar
{
mainClassName
=
'com.example.Application'
{
launchScript
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment