net.nemerosa.ontrack.kdsl.spec.extension.general.BuildLinkDisplayPropertyExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-kdsl Show documentation
Show all versions of ontrack-kdsl Show documentation
Ontrack module: ontrack-kdsl
package net.nemerosa.ontrack.kdsl.spec.extension.general
import net.nemerosa.ontrack.json.parse
import net.nemerosa.ontrack.kdsl.spec.Project
import net.nemerosa.ontrack.kdsl.spec.deleteProperty
import net.nemerosa.ontrack.kdsl.spec.getProperty
import net.nemerosa.ontrack.kdsl.spec.setProperty
var Project.buildLinkDisplayProperty: BuildLinkDisplayProperty?
get() = getProperty(BUILD_LINK_DISPLAY_PROPERTY)?.parse()
set(value) {
if (value != null) {
setProperty(BUILD_LINK_DISPLAY_PROPERTY, value)
} else {
deleteProperty(BUILD_LINK_DISPLAY_PROPERTY)
}
}
var Project.buildLinkDisplayUseLabel: Boolean?
get() = buildLinkDisplayProperty?.useLabel
set(value) {
if (value != null) {
buildLinkDisplayProperty = BuildLinkDisplayProperty(useLabel = value)
} else {
buildLinkDisplayProperty = null
}
}
const val BUILD_LINK_DISPLAY_PROPERTY = "net.nemerosa.ontrack.extension.general.BuildLinkDisplayPropertyType"
data class BuildLinkDisplayProperty(
val useLabel: Boolean,
)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy