All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.fix.gradle.release.plugin.ReleaseExtension.kt Maven / Gradle / Ivy

Go to download

Plugin automatically creates branches and tags and changes version in project gradle.properties file.

There is a newer version: 1.4.3
Show newest version
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)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy