Class BuildInfoProperties
java.lang.Object
org.springframework.boot.gradle.tasks.buildinfo.BuildInfoProperties
- All Implemented Interfaces:
Serializable
The properties that are written into the
build-info.properties file.- Since:
- 2.0.0
- Author:
- Andy Wilkinson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the additional properties that will be included.Returns the value used for thebuild.artifactproperty.getGroup()Returns the value used for thebuild.groupproperty.getName()Returns the value used for thebuild.nameproperty.getTime()Returns the value used for thebuild.timeproperty.Returns the value used for thebuild.versionproperty.voidsetAdditional(Map<String, Object> additionalProperties) Sets the additional properties that will be included.voidsetArtifact(String artifact) Sets the value used for thebuild.artifactproperty.voidSets the value used for thebuild.groupproperty.voidSets the value used for thebuild.nameproperty.voidSets the value used for thebuild.timeproperty.voidsetVersion(String version) Sets the value used for thebuild.versionproperty.
-
Method Details
-
getGroup
Returns the value used for thebuild.groupproperty. Defaults to theProject's group.- Returns:
- the group
-
setGroup
Sets the value used for thebuild.groupproperty.- Parameters:
group- the group name
-
getArtifact
Returns the value used for thebuild.artifactproperty.- Returns:
- the artifact
-
setArtifact
Sets the value used for thebuild.artifactproperty.- Parameters:
artifact- the artifact
-
getVersion
Returns the value used for thebuild.versionproperty. Defaults to theProject's version.- Returns:
- the version
-
setVersion
Sets the value used for thebuild.versionproperty.- Parameters:
version- the version
-
getName
Returns the value used for thebuild.nameproperty. Defaults to theProject's display name.- Returns:
- the name
-
setName
Sets the value used for thebuild.nameproperty.- Parameters:
name- the name
-
getTime
Returns the value used for thebuild.timeproperty. Defaults toInstant.now()when theBuildInfoPropertiesinstance was created.- Returns:
- the time
-
setTime
Sets the value used for thebuild.timeproperty.- Parameters:
time- the build time
-
getAdditional
Returns the additional properties that will be included. When written, the name of each additional property is prefixed withbuild..- Returns:
- the additional properties
-
setAdditional
Sets the additional properties that will be included. When written, the name of each additional property is prefixed withbuild..- Parameters:
additionalProperties- the additional properties
-