Allow build info properties to be excluded
Update Maven and Gradle plugins to allow build info properties to be excluded. Prior to this commit, the `BuildPropertiesWriter` would fail with an NPE if the group, artifact, name or version properties were `null`. This was specifically problematic with the Gradle plugin, since its DSL allows `null` properties which would either be passed to the writer or, in the case of `artifact`, converted into a string value of "unspecified". See gh-27412
This commit is contained in:
committed by
Phillip Webb
parent
2034ad4827
commit
ea9faf8690
@@ -0,0 +1,16 @@
|
||||
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 = ''
|
||||
artifact = ''
|
||||
version = ''
|
||||
name = ''
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user