diff --git a/README.html b/README.html index b8a9a4d..ba8dc5f 100644 --- a/README.html +++ b/README.html @@ -75,11 +75,12 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf version.minor=0 version.patch=0 version.prerelease=beta +
Upon running the annotation processor, a source file GeneratedVersion.java
is automatically generated with static methods to access the semantic version data. The source is based on a fully customizable Mustache template.
To use your own template, simply create a version.mustache
file. The processor will automatically look for it.
To specify your own template name, use:
-@Version(template = "myversion.mustache")
+@Version(template = "version.mustache")
public class A {
// ...
Default Template
@@ -94,42 +95,42 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
-project
+PROJECT
The project name, if any.
MyProject
-buildDate
+BUILDDATE
The build date.
java.util.Date
-version
+VERSION
The full version string.
1.0.0-alpha+001
-major
+MAJOR
The major version.
1
-minor
+MINOR
The minor version.
0
-patch
+PATCH
The patch version.
0
-preRelease
+PRERELEASE
The pre-release version, if any.
alpha
-buildMeta
+BUILDMETA
The build metadata, if any.
001
@@ -285,24 +286,30 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
+packageName
+
+The package name.
+Same as annotated class
+
+
className
The name of the generated class.
GeneratedVersion
-
+
properties
The properties file.
-
+
template
The template file.
version.mustache
-
+
type
Either java
or kt
for Kotlin.
@@ -346,7 +353,7 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
Class & Source Generation
In order to also incorporate the generated source code into the source tree
, use the EWERK Annotation Processor Plugin. Start by adding the following to the very top of the build.gradle
file:
plugins {
- id "com.ewerk.gradle.plugins.annotation-processor" version "1.0.3"
+ id "com.ewerk.gradle.plugins.annotation-processor" version "1.0.4"
}
Then add the following to the build.gradle
file:
dependencies {
@@ -381,10 +388,11 @@ compileJava {
open class Main {
// ...
The Kotlin default template implements the same static fields and functions as the Java template.
-Please look at the Example for Kotlin project for samples on using Gradle and Kobalt.
+Please look at the Example for Kotlin project for samples on using Gradle (build.gradle) and Kobalt (Build.kt).
Auto-Increment
Incrementing the version is best left to your favorite build system.
For a solution using Gradle, please have a look at the build.gradle file in the example module directory. To run the example with patch version auto-incrementing, issue the following command:
gradle release run
+For a solution using Kobalt look at my Property File Editor plug-in.