Usage
Setting build.gradle
from Local File
buildscript {
dependencies {
classpath files('libs/gradle-semantic-versioning-manager-plugin-0.1.0.jar')
}
}
plugins {
// ~~~
}
apply plugin: 'io.github.mainmethod0126.simple-semantic-version'
from Gradle Plugin Portal
Using legacy plugin application:
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "io.github.mainmethod0126:app:0.1.0"
}
}
apply plugin: "io.github.mainmethod0126.simple-semantic-version"
Using the plugins DSL:
Currently, the "Using the plugins DSL" method is not available. We will try to solve the problem as soon as possible.
Example
Version Increment
Major
gradlew build -Pmajor=++
Minor
gradlew build -Pminor=++
Patch
gradlew build -Ppatch=++
Prerelease(pr)
PrereleaseVersion Since version is in text format, incremental method is not supported.
BuildMetadata(bm)
BuildMetadataVersion Since version is in text format, incremental method is not supported.
Version Change
Major
gradlew build -Pmajor=1
Minor
gradlew build -Pminor=2
Patch
gradlew build -Ppatch=3
Prerelease(pr)
gradlew build -Ppr=beta
BuildMetadata(bm)
gradlew build -Pbm=test
Java Version
gradlew build -Pjavav=17
Compositive
gradlew build -Pmajor=1 -Pminor=2 -Ppatch=3 -Ppr=beta -Pbm=test -Pjavav=17
Build Artifacts Sample
gradlew build -Pmajor=1 -Pminor=2 -Ppatch=3 -Ppr=beta -Pbm=test -Pjavav=17
<application root>/dist/<YYYY-MM-DD>/<java version>/<version>/app-<major.minor.patch>-<prereleaseVersion>-<buildMetadata>.jar
Directory : dist
A folder called "dist" is automatically created in the application root path, and Build Artifacts are located under the "dist" folder. (If it already exists, the creation process is skipped)
Directory : YYYY-MM-DD
The year, month, and day information of the build is created as a directory. (ex: 2023-02-07)
Directory : java version
During gradle build, the java version entered through -Pjavav is created as a directory. (When the javav option is omitted, the build java version is used by default)
Directory : version
The directory is created with the final version information generated during Gradle build. (ex : app-1.2.3-beta-test)