ru.fix.gradle.release.plugin.ReleaseExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-release-plugin Show documentation
Show all versions of gradle-release-plugin Show documentation
Plugin automatically creates branches and tags and changes version in project gradle.properties file.
package ru.fix.gradle.release.plugin
enum class ReleaseDetection{
MAJOR_MINOR_FROM_BRANCH_NAME_PATCH_FROM_TAG,
MAJOR_MINOR_PATCH_FROM_TAG
}
open class ReleaseExtension {
var releaseBranchPrefix = "release/"
var commitMessageTemplate = "Release v{VERSION}"
var tagNameTemplate = "{VERSION}"
var templateVersionMarker = "{VERSION}"
var nextReleaseVersionDeterminationSchema = ReleaseDetection.MAJOR_MINOR_FROM_BRANCH_NAME_PATCH_FROM_TAG
fun commitMessage(version: String) = commitMessageTemplate.replace(templateVersionMarker, version)
fun tagName(version: String) = tagNameTemplate.replace(templateVersionMarker, version)
}