Make consistent use of Property for Gradle task configuration
Closes gh-32769
This commit is contained in:
@@ -9,7 +9,7 @@ version = '1.0'
|
||||
springBoot {
|
||||
buildInfo {
|
||||
properties {
|
||||
additionalProperties = [
|
||||
additional = [
|
||||
'a': 'alpha', 'b': 'bravo'
|
||||
]
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ apply plugin: 'org.graalvm.buildtools.native'
|
||||
|
||||
task('bootBuildImageConfiguration') {
|
||||
doFirst {
|
||||
println "builder = ${tasks.getByName('bootBuildImage').builder}"
|
||||
println "BP_NATIVE_IMAGE = ${tasks.getByName('bootBuildImage').environment['BP_NATIVE_IMAGE']}"
|
||||
println "builder = ${tasks.getByName('bootBuildImage').builder.get()}"
|
||||
println "BP_NATIVE_IMAGE = ${tasks.getByName('bootBuildImage').environment.get()['BP_NATIVE_IMAGE']}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ plugins {
|
||||
version = '0.1.0'
|
||||
|
||||
task buildInfo(type: org.springframework.boot.gradle.tasks.buildinfo.BuildInfo) {
|
||||
destinationDir project.buildDir
|
||||
properties {
|
||||
artifact = 'foo'
|
||||
group = 'foo'
|
||||
|
||||
@@ -6,11 +6,5 @@ group = 'foo'
|
||||
version = '0.1.0'
|
||||
|
||||
task buildInfo(type: org.springframework.boot.gradle.tasks.buildinfo.BuildInfo) {
|
||||
destinationDir project.buildDir
|
||||
properties {
|
||||
group = ''
|
||||
artifact = ''
|
||||
version = ''
|
||||
name = ''
|
||||
}
|
||||
excludes = ['group', 'artifact', 'version', 'name']
|
||||
}
|
||||
@@ -3,11 +3,11 @@ plugins {
|
||||
}
|
||||
|
||||
task buildInfo(type: org.springframework.boot.gradle.tasks.buildinfo.BuildInfo) {
|
||||
excludes = ["time"]
|
||||
properties {
|
||||
artifact = 'example'
|
||||
group = 'com.example'
|
||||
name = 'example'
|
||||
additional = ['additional': 'alpha']
|
||||
time = null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,11 +5,11 @@ plugins {
|
||||
version = '{projectVersion}'
|
||||
|
||||
task buildInfo(type: org.springframework.boot.gradle.tasks.buildinfo.BuildInfo) {
|
||||
excludes = ["time"]
|
||||
properties {
|
||||
artifact = 'example'
|
||||
group = 'com.example'
|
||||
name = 'example'
|
||||
additional = ['additional': 'alpha']
|
||||
time = null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '{version}' apply false
|
||||
}
|
||||
|
||||
group = 'foo'
|
||||
version = '0.1.0'
|
||||
|
||||
task buildInfo(type: org.springframework.boot.gradle.tasks.buildinfo.BuildInfo) {
|
||||
destinationDir project.buildDir
|
||||
properties {
|
||||
group = null
|
||||
artifact = null
|
||||
version = null
|
||||
name = null
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,5 @@ plugins {
|
||||
}
|
||||
|
||||
task buildInfo(type: org.springframework.boot.gradle.tasks.buildinfo.BuildInfo) {
|
||||
properties {
|
||||
time = null
|
||||
}
|
||||
excludes = ["time"]
|
||||
}
|
||||
|
||||
@@ -3,7 +3,5 @@ plugins {
|
||||
}
|
||||
|
||||
task buildInfo(type: org.springframework.boot.gradle.tasks.buildinfo.BuildInfo) {
|
||||
properties {
|
||||
time = null
|
||||
}
|
||||
excludes = ["time"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user