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.artifact
property.getGroup()
Returns the value used for thebuild.group
property.getName()
Returns the value used for thebuild.name
property.getTime()
Returns the value used for thebuild.time
property.Returns the value used for thebuild.version
property.void
setAdditional
(Map<String, Object> additionalProperties) Sets the additional properties that will be included.void
setArtifact
(String artifact) Sets the value used for thebuild.artifact
property.void
Sets the value used for thebuild.group
property.void
Sets the value used for thebuild.name
property.void
Sets the value used for thebuild.time
property.void
setVersion
(String version) Sets the value used for thebuild.version
property.
-
Method Details
-
getGroup
Returns the value used for thebuild.group
property. Defaults to theProject's group
.- Returns:
- the group
-
setGroup
Sets the value used for thebuild.group
property.- Parameters:
group
- the group name
-
getArtifact
Returns the value used for thebuild.artifact
property.- Returns:
- the artifact
-
setArtifact
Sets the value used for thebuild.artifact
property.- Parameters:
artifact
- the artifact
-
getVersion
Returns the value used for thebuild.version
property. Defaults to theProject's version
.- Returns:
- the version
-
setVersion
Sets the value used for thebuild.version
property.- Parameters:
version
- the version
-
getName
Returns the value used for thebuild.name
property. Defaults to theProject's display name
.- Returns:
- the name
-
setName
Sets the value used for thebuild.name
property.- Parameters:
name
- the name
-
getTime
Returns the value used for thebuild.time
property. Defaults toInstant.now()
when theBuildInfoProperties
instance was created.- Returns:
- the time
-
setTime
Sets the value used for thebuild.time
property.- 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
-