Use app…DefaultJvmArgs as convention for start script's defaultJvmOpts

Closes gh-12631
This commit is contained in:
Andy Wilkinson
2018-06-04 17:23:21 +01:00
parent 624946a779
commit 00449bef6a
4 changed files with 23 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ apply plugin: 'org.springframework.boot'
if (project.hasProperty('applyApplicationPlugin')) {
apply plugin: 'application'
applicationDefaultJvmArgs = ['-Dcom.example.a=alpha', '-Dcom.example.b=bravo']
}
task('taskExists') {
@@ -31,3 +32,11 @@ task('javaCompileEncoding') {
}
}
}
task('startScriptsDefaultJvmOpts') {
doFirst {
tasks.withType(org.springframework.boot.gradle.tasks.application.CreateBootStartScripts) {
println "$name defaultJvmOpts = $defaultJvmOpts"
}
}
}