Skip to content
This repository was archived by the owner on Sep 4, 2023. It is now read-only.

Latest commit

 

History

History
58 lines (40 loc) · 1.3 KB

File metadata and controls

58 lines (40 loc) · 1.3 KB

Genesis Version Gradle Plugin

Version handling for Gradle projects.

Activation

plugins {
    id("de.lancom.genesis.version") version "<version>"
}

Configuration

genesisVersion {
    withHotfixDigits(0)
    withType("default"|"snapshot"|"release"|"hotfix"|"build")
    withTagPrefix("VERSION-")
    withBranch("master")
}

Version Types

default

Does not modify the configured version.

snapshot

Replaces the version qualifier with "SNAPSHOT"

release

Removes the version qualifier

hotfix

Uses the next free hotfix version for the given version available in the publishing repository

build

Replaces the version qualifier the git commit hash and the system user

Tasks

printVersion

Prints the project version.

tagVersion

Creates a git tag using the project version and tag prefix.

checkBranchVersion

Checks that the project version is newer that the one configured in the latest commit of the configured git branch.

checkPublishedVersion

Checks that the project version is newer that the one latest one published in the publishing maven repository.

Example

An example project can be found in the examples/project.

Execute ./gradlew -p example <tasks> to run tasks of the example project.