\ No newline at end of file
diff --git a/.idea/intellij-javadocs-4.0.1.xml b/.idea/intellij-javadocs-4.0.1.xml
deleted file mode 100644
index fbb9478..0000000
--- a/.idea/intellij-javadocs-4.0.1.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
-
- UPDATE
- false
- true
-
- FIELD
- TYPE
- METHOD
-
-
- DEFAULT
- PUBLIC
- PROTECTED
-
-
-
-
-
- ^.*(public|protected|private)*.+interface\s+\w+.*
- /**\n
- * The interface ${name}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
- */
-
-
- ^.*(public|protected|private)*.+enum\s+\w+.*
- /**\n
- * The enum ${name}.\n
- */
-
-
- ^.*(public|protected|private)*.+class\s+\w+.*
- /**\n
- * The type ${name}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
- */
-
-
- .+
- /**\n
- * The type ${name}.\n
- */
-
-
-
-
- .+
- /**\n
- * Instantiates a new ${name}.\n
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
-
-
- ^.*(public|protected|private)*\s*.*(\w(\s*<.+>)*)+\s+get\w+\s*\(.*\).+
- /**\n
- * Gets ${partName}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if isNotVoid>
- *\n
- * @return the ${partName}\n
-</#if>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
- ^.*(public|protected|private)*\s*.*(void|\w(\s*<.+>)*)+\s+set\w+\s*\(.*\).+
- /**\n
- * Sets ${partName}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if isNotVoid>
- *\n
- * @return the ${partName}\n
-</#if>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
- ^.*((public\s+static)|(static\s+public))\s+void\s+main\s*\(\s*String\s*(\[\s*\]|\.\.\.)\s+\w+\s*\).+
- /**\n
- * The entry point of application.\n
-
- <#if element.parameterList.parameters?has_content>
- *\n
-</#if>
- * @param ${element.parameterList.parameters[0].name} the input arguments\n
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
- .+
- /**\n
- * ${name}<#if isNotVoid> ${return}</#if>.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if isNotVoid>
- *\n
- * @return the ${return}\n
-</#if>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
-
-
- ^.*(public|protected|private)*.+static.*(\w\s\w)+.+
- /**\n
- * The constant ${element.getName()}.\n
- */
-
-
- ^.*(public|protected|private)*.*(\w\s\w)+.+
- /**\n
- <#if element.parent.isInterface()>
- * The constant ${element.getName()}.\n
-<#else>
- * The ${name}.\n
-</#if> */
-
-
- .+
- /**\n
- <#if element.parent.isEnum()>
- *${name} ${typeName}.\n
-<#else>
- * The ${name}.\n
-</#if>*/
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 0000000..5806fb3
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml
deleted file mode 100644
index a203de8..0000000
--- a/.idea/libraries/bld.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/compile.xml b/.idea/libraries/compile.xml
deleted file mode 100644
index 5316b95..0000000
--- a/.idea/libraries/compile.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/runtime.xml b/.idea/libraries/runtime.xml
deleted file mode 100644
index d4069f2..0000000
--- a/.idea/libraries/runtime.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/test.xml b/.idea/libraries/test.xml
deleted file mode 100644
index 05f52ce..0000000
--- a/.idea/libraries/test.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 61cdf16..5d9e04b 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,16 +1,10 @@
-
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 55adcb9..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules/examples-kotlin_main.iml b/.idea/modules/examples-kotlin_main.iml
new file mode 100644
index 0000000..33346db
--- /dev/null
+++ b/.idea/modules/examples-kotlin_main.iml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/examples-kotlin_test.iml b/.idea/modules/examples-kotlin_test.iml
new file mode 100644
index 0000000..ad47dc2
--- /dev/null
+++ b/.idea/modules/examples-kotlin_test.iml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/Run Tests.xml b/.idea/runConfigurations/Run Tests.xml
deleted file mode 100644
index 5c0ca65..0000000
--- a/.idea/runConfigurations/Run Tests.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/semver.iml b/.idea/semver.iml
new file mode 100644
index 0000000..78b2cc5
--- /dev/null
+++ b/.idea/semver.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 35eb1dd..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..58e8252
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,7 @@
+language: java
+
+jdk:
+ - oraclejdk8
+
+before_install:
+ - chmod +x gradlew
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index f1d1e89..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# Changelog
-
-## [1.2.1](https://github.com/ethauvin/semver/tree/1.2.1) (2023-10-01)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/1.2.0...1.2.1)
-
-**Implemented enhancements:**
-
-- Move from Gradle to bld [\#7](https://github.com/ethauvin/semver/issues/7)
-
-**Fixed bugs:**
-
-- NPE with Java 12 and Kotlin 1.3.30 [\#1](https://github.com/ethauvin/semver/issues/1)
-
-**Closed issues:**
-
-- Under Java 12 and Gradle 5.4.1 the properties file is not found. [\#6](https://github.com/ethauvin/semver/issues/6)
-
-## [1.2.0](https://github.com/ethauvin/semver/tree/1.2.0) (2019-05-25)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/1.1.1...1.2.0)
-
-**Implemented enhancements:**
-
-- Calculate the version internally. [\#4](https://github.com/ethauvin/semver/issues/4)
-- Attempt to compile non-existent Java source in Gradle project using Kapt [\#3](https://github.com/ethauvin/semver/issues/3)
-- kapt and Kotlin 1.3.30 require kapt.use.worker.api=true [\#2](https://github.com/ethauvin/semver/issues/2)
-
-**Fixed bugs:**
-
-- Default template is not found in 1.1.1 [\#5](https://github.com/ethauvin/semver/issues/5)
-
-## [1.1.1](https://github.com/ethauvin/semver/tree/1.1.1) (2019-03-31)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/1.1.0-beta...1.1.1)
-
-## [1.1.0-beta](https://github.com/ethauvin/semver/tree/1.1.0-beta) (2018-11-04)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/1.0.1...1.1.0-beta)
-
-## [1.0.1](https://github.com/ethauvin/semver/tree/1.0.1) (2017-05-30)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/1.0.0...1.0.1)
-
-## [1.0.0](https://github.com/ethauvin/semver/tree/1.0.0) (2017-05-10)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/0.9.6-beta...1.0.0)
-
-## [0.9.6-beta](https://github.com/ethauvin/semver/tree/0.9.6-beta) (2016-07-15)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/0.9.5-beta...0.9.6-beta)
-
-## [0.9.5-beta](https://github.com/ethauvin/semver/tree/0.9.5-beta) (2016-02-03)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/0.9.4-beta...0.9.5-beta)
-
-## [0.9.4-beta](https://github.com/ethauvin/semver/tree/0.9.4-beta) (2016-01-29)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/0.9.3-beta...0.9.4-beta)
-
-## [0.9.3-beta](https://github.com/ethauvin/semver/tree/0.9.3-beta) (2016-01-28)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/0.9.2-beta...0.9.3-beta)
-
-## [0.9.2-beta](https://github.com/ethauvin/semver/tree/0.9.2-beta) (2016-01-25)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/0.9.1-beta...0.9.2-beta)
-
-## [0.9.1-beta](https://github.com/ethauvin/semver/tree/0.9.1-beta) (2016-01-25)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/0.9.0-beta...0.9.1-beta)
-
-## [0.9.0-beta](https://github.com/ethauvin/semver/tree/0.9.0-beta) (2016-01-24)
-
-[Full Changelog](https://github.com/ethauvin/semver/compare/aeee81544c6d2881ccf02458fcef1f6ba1c9c169...0.9.0-beta)
-
-
-
-\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
diff --git a/LICENSE.txt b/LICENSE.txt
index ae2f49e..ca0e615 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2016-2024, Erik C. Thauvin (erik@thauvin.net)
+Copyright (c) 2016-2018, Erik C. Thauvin (erik@thauvin.net)
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -24,4 +24,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/README.md b/README.md
index cada04f..cefe757 100644
--- a/README.md
+++ b/README.md
@@ -1,62 +1,32 @@
-# Semantic Version Annotation Processor
+# Semantic Version Annotation Processor
-[](https://opensource.org/licenses/BSD-3-Clause)
-[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
-[](https://rife2.com/bld)
-[](https://github.com/ethauvin/semver/releases/latest)
-[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/semver/)
-[](https://central.sonatype.com/artifact/net.thauvin.erik/semver)
+[](http://opensource.org/licenses/BSD-3-Clause) [](https://github.com/ethauvin/semver/releases/latest) [](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver) [  ](https://bintray.com/ethauvin/maven/SemVer/_latestVersion)
+[](https://snyk.io/test/github/ethauvin/semver?targetFile=build.gradle) [](https://travis-ci.org/ethauvin/semver) [](https://ci.appveyor.com/project/ethauvin/semver) [](https://circleci.com/gh/ethauvin/semver/tree/master)
-[](https://sonarcloud.io/dashboard?id=ethauvin_semver)
-[](https://github.com/ethauvin/semver/actions/workflows/bld.yml)
-[](https://ci.appveyor.com/project/ethauvin/semver)
-[](https://circleci.com/gh/ethauvin/semver/tree/master)
-
-An [annotation processor](https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html) that automatically generates a `GeneratedVersion` class based on a [Mustache](https://mustache.github.io/) template and containing the [semantic version](https://semver.org/) (major, minor, patch, etc.) that is read from a [Properties](https://docs.oracle.com/javase/tutorial/essential/environment/properties.html) file or defined in the [annotation](https://docs.oracle.com/javase/tutorial/java/annotations/basics.html).
+An [annotation processor](https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html) that automatically generates a `GeneratedVersion` class based on a [Mustache](https://mustache.github.io/) template and containing the [semantic version](http://semver.org/) (major, minor, patch, etc.) that is read from a `Properties` file or defined in the [annotation](https://docs.oracle.com/javase/tutorial/java/annotations/basics.html).
This processor was inspired by Cédric Beust's [version-processor](https://github.com/cbeust/version-processor) and works well in conjunction with the [__Semantic Version Plugin for Gradle__](https://github.com/ethauvin/semver-gradle).
-## Table of Contents
-
-- [Semantic Version Annotation Processor](#semantic-version-annotation-processor)
- - [Table of Contents](#table-of-contents)
- - [Examples](#examples)
- - [Template](#template)
- - [Default Template](#default-template)
- - [Custom Template](#custom-template)
- - [Elements \& Properties](#elements--properties)
- - [Maven](#maven)
- - [bld](#bld)
- - [Gradle](#gradle)
- - [Class Generation](#class-generation)
- - [Class \& Source Generation](#class--source-generation)
- - [Kotlin](#kotlin)
- - [Kotlin \& Gradle](#kotlin--gradle)
- - [Auto-Increment](#auto-increment)
- - [Contributing](#contributing)
-
## Examples
-- Using annotation elements:
+* Using annotation elements:
```java
import net.thauvin.erik.semver.Version;
-@Version(major = 2, minor = 1, patch = 1, preRelease = "beta")
+@Version(major = 1, minor = 0, patch = 0, preRelease = "beta")
public class A {
- // ...
-}
+// ...
```
-- Or using a [properties](hhttps://github.com/ethauvin/semver/blob/master/examples/java/version.properties) file:
+* Or using a [properties](https://docs.oracle.com/javase/tutorial/essential/environment/properties.html) file:
```java
import net.thauvin.erik.semver.Version;
@Version(properties = "version.properties")
public class A {
- // ...
-}
+// ...
```
```ini
@@ -67,11 +37,11 @@ version.patch=0
version.prerelease=beta
```
-[View Examples](https://github.com/ethauvin/semver/tree/master/examples)
+[View Example](https://github.com/ethauvin/semver/tree/master/examples)
## Template
-Upon running the annotation processor, a source file [GeneratedVersion.java](https://github.com/ethauvin/semver/blob/master/examples/java/src/generated/java/com/example/GeneratedVersion.java) is automatically generated with static methods to access the semantic version data. The source is based on a fully customizable Mustache [template](https://github.com/ethauvin/semver/blob/master/src/main/resources/semver.mustache).
+Upon running the annotation processor, a source file [`GeneratedVersion.java`](https://github.com/ethauvin/semver/blob/master/examples/java/src/generated/java/net/thauvin/erik/semver/examples/java/GeneratedVersion.java) is automatically generated with static methods to access the semantic version data. The source is based on a fully customizable [Mustache](https://mustache.github.io/) template.
To use your own template, simply create a `version.mustache` file in the project's root directory. The processor will automatically look for it.
@@ -80,27 +50,30 @@ To specify your own template name, use:
```java
@Version(template = "version.mustache")
public class A {
- // ...
-}
+// ...
```
### Default Template
-The [default template](https://github.com/ethauvin/semver/blob/master/src/main/resources/semver.mustache) implements the following static variables:
+The [default template](https://github.com/ethauvin/semver/blob/master/src/main/resources/semver.mustache) implements the following static fields:
-| Field | Description | Example |
-|:-------------------|:---------------------------------|:----------------------------------------------------------------------------------|
-| `PROJECT` | The project name, if any. | `MyProject` |
-| `BUILDDATE` | The build date. | [`java.util.Date`](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html) |
-| `VERSION` | The full version string. | `1.2.3-alpha+001` |
-| `MAJOR` | The major version. | `1` |
-| `MINOR` | The minor version. | `2` |
-| `PATCH` | The patch version. | `3` |
-| `PRERELEASE` | The pre-release version, if any. | `alpha` |
-| `PRERELASE_PREFIX` | The pre-release prefix | `-` |
-| `BUILDMETA` | The build metadata, if any. | `001` |
-| `BUILDMETA_PREFIX` | The metadata prefix. | `+` |
-| `SEPARATOR` | The version separator. | `.` |
+Field | Description | Example
+:--------------|:---------------------------------|:-----------------
+`PROJECT` | The project name, if any. | `MyProject`
+`BUILDDATE` | The build date. | [`java.util.Date`](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html)
+`VERSION` | The full version string. | `1.2.3-alpha+001`
+`MAJOR` | The major version. | `1`
+`MINOR` | The minor version. | `2`
+`PATCH` | The patch version. | `3`
+`PRERELEASE` | The pre-release version, if any. | `alpha`
+`BUILDMETA` | The build metadata, if any. | `001`
+
+And the following methods/functions:
+
+Method | Description | Example
+:------------------------|:----------------------------------------------------------|:--------
+`preReleaseWithPrefix()` | Returns the pre-release with a prefix, `-` by default. | `-alpha`
+`buildMetaWithPrefix()` | Returns the build metadata with a prefix, `+` by default. | `+001`
### Custom Template
@@ -108,63 +81,61 @@ A very simple custom template might look something like:
```java
/* version.mustache */
-package {{packageName}};
+package {{packageName}}
import java.util.Date;
public final class {{className}} {
public final static String PROJECT = "{{project}}";
public final static Date DATE = new Date({{epoch}}L);
- public final static String VERSION = "{{semver}}";
+ public final static int MAJOR = {{major}};
+ public final static int MINOR = {{minor}};
+ public final static int PATCH = {{patch}};
+ public final static String PRERELEASE = "{{preRelease}}";
+ public final static String BUILDMETA = "{{buildMeta}}";
}
```
-
The mustache variables automatically filled in by the processor are:
-| Variable | Description | Type |
-|:------------------------------|:----------------------------|:---------|
-| `{{packageName}}` | The package name. | `String` |
-| `{{className}}` | The class name. | `String` |
-| `{{project}}` | The project name. | `String` |
-| `{{epoch}}` | The build epoch/unix time. | `long` |
-| `{{major}}` | The major version. | `int` |
-| `{{minor}}` | The minor version. | `int` |
-| `{{patch}}` | The patch version. | `int` |
-| `{{preRelease}}` | The pre-release version. | `String` |
-| `{{preReleasePrefix}}` | The pre-release prefix. | `String` |
-| `{{buildMeta}}` | The build metadata version. | `String` |
-| `{{buildMetaPrefix}}` | The metadata prefix. | `String` |
-| `{{separator}}` | The version separator. | `String` |
-| `{{semver}}` or `{{version}}` | The full semantic version. | `String` |
+Variable | Description | Type
+:-----------------|:----------------------------|:--------
+`{{packageName}}` | The package name. | `String`
+`{{className}}` | The class name. | `String`
+`{{project}}` | The project name. | `String`
+`{{epoch}}` | The build epoch/unix time. | `long`
+`{{major}}` | The major version. | `int`
+`{{minor}}` | The minor version. | `int`
+`{{patch}}` | The patch version. | `int`
+`{{preRelease}}` | The pre/release version. | `String`
+`{{buildMeta}}` | The build metadata version. | `String`
+
+Please also look at this [example](https://github.com/ethauvin/mobibot/blob/master/version.mustache) using [`java.time`](https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html)
## Elements & Properties
The following annotation elements and properties are available:
-| Element | Property | Description | Default |
-|:-------------------|:----------------------------|:----------------------------------|:--------------------------|
-| `project` | `version.project` | The project name. | |
-| `major` | `version.major` | The major version number. | `1` |
-| `minor` | `version.major` | The minor version number. | `0` |
-| `patch` | `version.patch` | The patch version number. | `0` |
-| `preRelease` | `version.prerelease` | The pre-release version. | |
-| `preReleasePrefix` | `version.prerelease.prefix` | The pre-release prefix. | `-` |
-| `buildMeta` | `version.buildmeta` | The build metadata version. | |
-| `buildMetaPrefix` | `version.buildmeta.prefix` | The metadata prefix. | `+` |
-| `separator` | `version.separator` | The version separator. | `.` |
-| `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. | `java` |
-| `keysPrefix` | | The prefix for all property keys. | `version.` |
+Element | Property | Description | Default
+:-------------|:---------------------|:----------------------------------|:-------------------------
+`project` | `version.project` | The project name. |
+`major` | `version.major` | The major version number. | `1`
+`minor` | `version.major` | The minor version number. | `0`
+`patch` | `version.patch` | The patch version number. | `0`
+`preRelease` | `version.prerelease` | The pre-release version. |
+`buildMeta` | `version.buildmeta` | The build metadata version. |
+`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. | `java`
+`keysPrefix` | | The prefix for all property keys. | `version.`
In order to easily incorporate with existing projects, the property keys may be assigned custom values:
```java
@Version(
properties = "example.properties",
- keysPrefix = "example.",
+ keysPrefix = "example."
majorKey = "maj",
minorKey = "min",
patchKey = "build",
@@ -173,8 +144,7 @@ In order to easily incorporate with existing projects, the property keys may be
projectKey = "project"
)
public class Example {
- // ...
-}
+// ...
```
```ini
@@ -188,86 +158,64 @@ example.meta=
# ...
```
-> :warning: `keysPrefix` is a new element staring in `1.1.0` and may break older versions when using custom property keys.\
+> :warning: `keysPrefix` is a new element in `1.1.0` and may break older versions when using custom property keys.
> :zap: A quick fix is to include `keysPrefix=""` in the annotation to remove the default `version.` prefix.
-## Maven
+## Usage with Maven, Grail, Kobalt and Kotlin
-To install and run from [Maven](https://maven.apache.org/), configure an artifact as follows:
+### Maven
+
+To install and run from [Maven](http://maven.apache.org/), configure an artifact as follows:
```xml
net.thauvin.eriksemver
- 1.2.1
+ 1.1.0-beta
```
-```console
-mvn verify
-```
+### Gradle
-Please look at [pom.xml](https://github.com/ethauvin/semver/blob/master/examples/java/gradle/pom.xml) in the [examples/java/gradle](https://github.com/ethauvin/semver/tree/master/examples/java/gradle) directory for a sample:
+#### Class Generation
-
-## bld
-
-To install and run from [bld](https://rife2.com/bld), just add the dependency to your build file:
-
-```java
-public class ExampleBuild extends Project {
- public ExampleBuild() {
- // ...
- scope(compile)
- .include(dependency("net.thauvin.erik", "semver", version(1, 2, 1)));
- }
-}
-```
-
-Please look at [ExampleBuild](https://github.com/ethauvin/semver/blob/master/examples/java/bld/src/bld/java/com/example/ExampleBuild.java) in the [examples/java/bld](https://github.com/ethauvin/semver/tree/master/examples/java/bld) directory for a sample. It also shows how to incorporate the generated code into the `source tree`, more information is also available [here](https://forum.uwyn.com/post/36).
-
-bld also has a [Generated Version](https://github.com/rife2/bld-generated-version) extension which provides similar functionalities.
-
-## Gradle
-
-### Class Generation
-
-To install and run from [Gradle](https://gradle.org/), add the following to [build.gradle](https://github.com/ethauvin/semver/blob/master/examples/java/gradle/build.gradle):
+To install and run from [Gradle](https://gradle.org/), add the following to the `build.gradle` file:
```gradle
-repositories {
- mavenCentral()
-}
-
dependencies {
- annotationProcessor 'net.thauvin.erik:semver:1.2.1'
- compileOnly 'net.thauvin.erik:semver:1.2.1'
-}
-
-tasks.withType(JavaCompile).configureEach {
- options.compilerArgs += [ "-Asemver.project.dir=$projectDir" ]
+ annotationProcessor 'net.thauvin.erik:semver:1.1.0-beta'
+ compileOnly 'net.thauvin.erik:semver:1.1.0-beta'
}
```
-The directory containing the configuration files (`version.properties`, `version.mustache`) must be specified using the `semver.project.dir` processor argument.
+The `GeneratedVersion` class will be automatically created in the `build/generated` directory upon compiling.
-The [`GeneratedVersion.java`](https://github.com/ethauvin/semver/blob/master/examples/java/src/generated/java/com/example/GeneratedVersion.java) class will be automatically created in the `build/generated` directory upon compiling.
+#### Class & Source Generation
-Please look at [build.gradle](https://github.com/ethauvin/semver/blob/master/examples/java/gradle/build.gradle) in the [examples/java/gradle](https://github.com/ethauvin/semver/tree/master/examples/java/gradle) directory for a sample.
-
-### Class & Source Generation
-
-In order to also incorporate the generated source code into the `source tree`, add the following to [build.gradle](https://github.com/ethauvin/semver/blob/master/examples/java/build.gradle):
+In order to also incorporate the generated source code into the `source tree`, add the following to the very top of the `build.gradle` file:
```gradle
-tasks.withType(JavaCompile).configureEach {
- options.generatedSourceOutputDirectory.set(file("${projectDir}/src/generated/java"))
+compileJava.options.annotationProcessorGeneratedSourcesDirectory = file("${projectDir}/src/generated/java")
+```
+
+The `GeneratedVersion.java` file will now be located in `src/generated`.
+
+Please look at the [build.gradle](https://github.com/ethauvin/semver/blob/master/examples/java/build.gradle) file in the [Java example](https://github.com/ethauvin/semver/tree/master/example/java) module directory for a sample.
+
+### Kobalt
+
+To install and run from [Kobalt](http://beust.com/kobalt/), add the following to the `Build.kt` file:
+
+```gradle
+dependencies {
+ apt("net.thauvin.erik:semver:1.1.0-beta")
+ compileOnly("net.thauvin.erik:semver:1.1.0-beta")
}
```
-The [`GeneratedVersion.java`](https://github.com/ethauvin/semver/blob/master/examples/java/src/generated/java/com/example/GeneratedVersion.java) file will now be located in `src/generated`.
+Please look at the [Build.kt](https://github.com/ethauvin/semver/blob/master/examples/kotlin/kobalt/src/Build.kt) file in the [Kotlin example](https://github.com/ethauvin/semver/tree/master/examples/kotlin) module directory for a sample.
-## Kotlin
+### Kotlin
The annotation processor also supports [Kotlin](https://kotlinlang.org/).
@@ -278,56 +226,15 @@ import net.thauvin.erik.semver.Version
@Version(properties = "version.properties", type="kt")
open class Main {
- // ...
-}
+// ...
```
-
The [Kotlin default template](https://github.com/ethauvin/semver/blob/master/src/main/resources/semver-kt.mustache) implements the same static fields and functions as the [Java template](#default-template).
-Please look at the [examples/kotlin](https://github.com/ethauvin/semver/tree/master/examples/kotlin) project for a [build.gradle.kts](https://github.com/ethauvin/semver/blob/master/examples/kotlin/build.gradle.kts) sample.
+Please look at the [Kotlin example](https://github.com/ethauvin/semver/tree/master/examples/kotlin) project for samples on using Gradle ([build.gradle.kts](https://github.com/ethauvin/semver/blob/master/examples/kotlin/build.gradle.kts)) and Kobalt ([Build.kt](https://github.com/ethauvin/semver/blob/master/examples/kotlin/kobalt/src/Build.kt)).
-### Kotlin & Gradle
-
-To install and run from [Gradle](https://gradle.org/), add the following to [build.gradle.kts](https://github.com/ethauvin/semver/blob/master/examples/kotlin/build.gradle.kts):
-
-```kotlin
-var semverProcessor = "net.thauvin.erik:semver:1.2.1"
-
-dependencies {
- kapt(semverProcessor)
- compileOnly(semverProcessor)
-}
-
-kapt {
- arguments {
- arg("semver.project.dir", projectDir.absolutePath)
- }
-}
-```
-
-The directory containing the configuration files (`version.properties`, `version.mustache`) must be specified using the `semver.project.dir` processor argument.
## Auto-Increment
Incrementing the version is best left to your favorite build system. For a solution using Gradle, please have a look at the [__Semver Version Plugin for Gradle__](https://github.com/ethauvin/semver-gradle).
-There are also full [examples](https://github.com/ethauvin/semver-gradle/tree/master/examples/annotation-processor) in both [Java](https://github.com/ethauvin/semver-gradle/tree/master/examples/annotation-processor/java) and [Kotlin](https://github.com/ethauvin/semver-gradle/tree/master/examples/annotation-processor/kotlin) showing how to use both the plugin and annotation processor concurrently.
-
-## Contributing
-
-If you want to contribute to this project, all you have to do is clone the GitHub
-repository:
-
-```console
-git clone git@github.com:ethauvin/semver.git
-```
-
-Then use [bld](https://rife2.com/bld) to build:
-
-```console
-cd semver
-./bld compile
-```
-
-The project has an [IntelliJ IDEA](https://www.jetbrains.com/idea/) project structure. You can just open it after all
-the dependencies were downloaded and peruse the code.
+There are also full [examples](https://github.com/ethauvin/semver-gradle/tree/master/examples/annotation-processor) in both [Java](https://github.com/ethauvin/semver-gradle/tree/master/examples/annotation-processor/java) and [Kotlin](https://github.com/ethauvin/semver-gradle/tree/master/examples/annotation-processor) showing how to use both the plugin and annotation processor concurrently.
diff --git a/appveyor.yml b/appveyor.yml
index 05e9258..0ee7361 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,18 +1,26 @@
-version: build-{build}.{branch}
-clone_depth: 3
+version: "{branch} {build}"
+skip_tags: true
-platform: x64
-image: Visual Studio 2019
-
-before_build:
- - set "JAVA_HOME=C:\Program Files\Java\jdk17"
- - set "PATH=C:\Program Files\Java\jdk17\bin;%PATH%"
+build:
+ verbosity: detailed
build_script:
- - bld.bat download compile
+ - gradlew.bat assemble --info --no-daemon
test_script:
- - bld.bat test
+ - gradlew.bat check --info --no-daemon
+
+branches:
+ only:
+ - master
cache:
- - C:\Users\appveyor\.m2
+ - C:\Users\appveyor\.gradle
+
+environment:
+ matrix:
+ - JAVA_HOME: C:\Program Files\Java\jdk1.8.0
+ - JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0
+
+matrix:
+ fast_finish: true
diff --git a/bin/main/META-INF/services/javax.annotation.processing.Processor b/bin/main/META-INF/services/javax.annotation.processing.Processor
deleted file mode 100644
index 5ae1016..0000000
--- a/bin/main/META-INF/services/javax.annotation.processing.Processor
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# javax.annotation.processing.Processor
-#
-# Copyright (c) 2016-2023, Erik C. Thauvin (erik@thauvin.net)
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-#
-# Neither the name of this project nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-net.thauvin.erik.semver.VersionProcessor
diff --git a/bin/main/net/thauvin/erik/semver/Constants.class b/bin/main/net/thauvin/erik/semver/Constants.class
deleted file mode 100644
index b299307..0000000
Binary files a/bin/main/net/thauvin/erik/semver/Constants.class and /dev/null differ
diff --git a/bin/main/net/thauvin/erik/semver/Version.class b/bin/main/net/thauvin/erik/semver/Version.class
deleted file mode 100644
index 239b8a2..0000000
Binary files a/bin/main/net/thauvin/erik/semver/Version.class and /dev/null differ
diff --git a/bin/main/net/thauvin/erik/semver/VersionInfo.class b/bin/main/net/thauvin/erik/semver/VersionInfo.class
deleted file mode 100644
index 8351bcf..0000000
Binary files a/bin/main/net/thauvin/erik/semver/VersionInfo.class and /dev/null differ
diff --git a/bin/main/net/thauvin/erik/semver/VersionProcessor.class b/bin/main/net/thauvin/erik/semver/VersionProcessor.class
deleted file mode 100644
index 38b5676..0000000
Binary files a/bin/main/net/thauvin/erik/semver/VersionProcessor.class and /dev/null differ
diff --git a/bin/main/net/thauvin/erik/semver/package.html b/bin/main/net/thauvin/erik/semver/package.html
deleted file mode 100644
index 1b1b126..0000000
--- a/bin/main/net/thauvin/erik/semver/package.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- Semantic Version Annotation Processor
-
-
-An annotation processor that automatically generates a GeneratedVersion class containing the semantic
-version (major, minor, patch, etc.) that is read from a Properties file or defined in the annotation.
-
-@since 1.0
-
-
diff --git a/bin/main/semver-kt.mustache b/bin/main/semver-kt.mustache
deleted file mode 100644
index 0a58f86..0000000
--- a/bin/main/semver-kt.mustache
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-* This file is automatically generated.
-* Do not modify! -- ALL CHANGES WILL BE ERASED!
-*/
-
-package {{packageName}}
-
-import java.util.Date
-
-/**
-* Provides semantic version information.
-*
-* @author Semantic Version Annotation Processor
-*/
-object {{className}} {
-@JvmField
-val PROJECT = "{{project}}"
-@JvmField
-val BUILDDATE = Date({{epoch}}L)
-@JvmField
-val MAJOR = {{major}}
-@JvmField
-val MINOR = {{minor}}
-@JvmField
-val PATCH = {{patch}}
-@JvmField
-val PRERELEASE = "{{preRelease}}"
-@JvmField
-val PRERELEASE_PREFIX = "{{preReleasePrefix}}"
-@JvmField
-val BUILDMETA = "{{buildMeta}}"
-@JvmField
-val BUILDMEATA_PREFIX = "{{buildMetaPrefix}}"
-@JvmField
-val SEPARATOR = "{{separator}}"
-@JvmField
-val VERSION = "{{version}}"
-}
diff --git a/bin/main/semver.mustache b/bin/main/semver.mustache
deleted file mode 100644
index cd7c567..0000000
--- a/bin/main/semver.mustache
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* This file is automatically generated.
-* Do not modify! -- ALL CHANGES WILL BE ERASED!
-*/
-
-package {{packageName}};
-
-import java.util.Date;
-
-/**
-* Provides semantic version information.
-*
-* @author Semantic Version Annotation Processor
-*/
-public final class {{className}} {
-public static final String PROJECT = "{{project}}";
-public static final Date BUILDDATE = new Date({{epoch}}L);
-public static final int MAJOR = {{major}};
-public static final int MINOR = {{minor}};
-public static final int PATCH = {{patch}};
-public static final String PRERELEASE = "{{preRelease}}";
-public static final String PRERELEASE_PREFIX = "{{preReleasePrefix}}";
-public static final String BUILDMETA = "{{buildMeta}}";
-public static final String BUILDMETA_PREFIX = "{{buildMetaPrefix}}";
-public static final String SEPARATOR = "{{separator}}";
-public static final String VERSION = "{{version}}";
-
-/**
-* Disables the default constructor.
-*/
-private {{className}}() {
-throw new UnsupportedOperationException("Illegal constructor call.");
-}
-}
diff --git a/bin/test/net/thauvin/erik/semver/ConstantsTest.class b/bin/test/net/thauvin/erik/semver/ConstantsTest.class
deleted file mode 100644
index 934286a..0000000
Binary files a/bin/test/net/thauvin/erik/semver/ConstantsTest.class and /dev/null differ
diff --git a/bin/test/net/thauvin/erik/semver/VersionInfoTest.class b/bin/test/net/thauvin/erik/semver/VersionInfoTest.class
deleted file mode 100644
index d6401b4..0000000
Binary files a/bin/test/net/thauvin/erik/semver/VersionInfoTest.class and /dev/null differ
diff --git a/bin/test/net/thauvin/erik/semver/VersionProcessorTest.class b/bin/test/net/thauvin/erik/semver/VersionProcessorTest.class
deleted file mode 100644
index af2b771..0000000
Binary files a/bin/test/net/thauvin/erik/semver/VersionProcessorTest.class and /dev/null differ
diff --git a/bin/test/net/thauvin/erik/semver/VersionTest.class b/bin/test/net/thauvin/erik/semver/VersionTest.class
deleted file mode 100644
index 0047ff2..0000000
Binary files a/bin/test/net/thauvin/erik/semver/VersionTest.class and /dev/null differ
diff --git a/bld b/bld
deleted file mode 100755
index 824b742..0000000
--- a/bld
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env sh
-java -jar "$(dirname "$0")/lib/bld/bld-wrapper.jar" "$0" --build net.thauvin.erik.semver.SemverBuild "$@"
\ No newline at end of file
diff --git a/bld.bat b/bld.bat
deleted file mode 100644
index ab43bcd..0000000
--- a/bld.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-@echo off
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-java -jar "%DIRNAME%/lib/bld/bld-wrapper.jar" "%0" --build net.thauvin.erik.semver.SemverBuild %*
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..2dccfe3
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,184 @@
+plugins {
+ id 'java'
+ id 'maven-publish'
+ id "com.jfrog.bintray" version "1.8.4"
+ id "com.github.ben-manes.versions" version "0.20.0"
+ id "net.thauvin.erik.gradle.semver" version "0.9.8-beta"
+ id "com.github.spotbugs" version "1.6.5"
+}
+
+import com.github.spotbugs.SpotBugsTask
+import org.apache.tools.ant.taskdefs.condition.Os
+
+defaultTasks 'check'
+
+group = 'net.thauvin.erik'
+
+def mavenName = 'SemVer'
+def mavenDescription = 'Semantic Version Annotation Processor'
+def mavenUrl = 'https://github.com/ethauvin/semver'
+def mavenLicense = 'The BSD 3-Clause License'
+def mavenLicenseUrl = 'http://opensource.org/licenses/BSD-3-Clause'
+def mavenScmCon = 'https://github.com/ethauvin/semver.git'
+def mavenScmDevCon = 'git@github.com:ethauvin/semver.git'
+
+def pkgLicenses = ['BSD 3-Clause']
+def pkgIssueTrackerUrl = mavenUrl + '/issues'
+def pkgLabels = ['java', 'annotation', 'processor', 'semantic', 'version']
+
+sourceCompatibility = 1.8
+targetCompatibility = 1.8
+[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
+
+repositories {
+ mavenLocal()
+ jcenter()
+}
+
+dependencies {
+ compile 'com.github.spullara.mustache.java:compiler:0.9.5'
+ compileOnly 'com.github.spotbugs:spotbugs-annotations:3.1.8'
+ testCompile 'org.testng:testng:6.14.3'
+}
+
+bintray {
+ user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
+ key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
+ publications = ['MyPublication']
+ dryRun = false
+ pkg {
+ repo = 'maven'
+ name = mavenName
+ licenses = pkgLicenses
+ desc = mavenDescription
+ websiteUrl = mavenUrl
+ issueTrackerUrl = pkgIssueTrackerUrl
+ vcsUrl = mavenScmCon
+ labels = pkgLabels
+ publicDownloadNumbers = true
+ }
+}
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+ group = 'Build'
+ description = 'Builds an archive of the javadoc docs.'
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+}
+
+task sourceJar(type: Jar) {
+ group = 'Build'
+ description = 'Builds an archive of the source code.'
+ classifier = 'sources'
+ from sourceSets.main.allSource
+}
+
+artifacts {
+ archives javadocJar
+ archives sourceJar
+}
+
+publishing {
+ publications {
+ MyPublication(MavenPublication) {
+ from components.java
+ artifact sourceJar
+ artifact javadocJar
+ groupId project.group
+ artifactId rootProject.name
+
+ pom {
+ name = mavenName
+ description = mavenDescription
+ url = mavenUrl
+ licenses {
+ license {
+ name = mavenLicense
+ url = mavenLicenseUrl
+ distribution = 'repo'
+ }
+ }
+ developers {
+ developer {
+ id = 'ethauvin'
+ name = 'Erik C. Thauvin'
+ email = 'erik@thauvin.net'
+ }
+ }
+ scm {
+ connection = "scm:git:" + mavenScmCon
+ developerConnection = "scm:git:" + mavenScmDevCon
+ url = mavenScmCon
+ }
+ }
+ }
+ }
+}
+
+javadoc {
+ doFirst {
+ title = "$mavenDescription $project.version API"
+ }
+ options.with {
+ tags = ['created']
+ author = true
+ //addBooleanOption('html4', true)
+ links('https://docs.oracle.com/javase/8/docs/api/')
+ addStringOption('Xdoclint:none', '-quiet')
+ }
+}
+
+test {
+ useTestNG()
+}
+
+tasks.withType(SpotBugsTask) {
+ reports {
+ xml.enabled = false
+ html.enabled = true
+ }
+ excludeFilter = file("$projectDir/config/spotbugs/excludeFilter.xml")
+}
+
+compileJava {
+ options.compilerArgs.add('-proc:none')
+}
+
+compileTestJava {
+ options.compilerArgs.add('-proc:none')
+}
+
+bintrayUpload {
+ versionName = "$project.version"
+ versionDesc = "Beta version $project.version"
+ versionVcsTag = "$project.version"
+ signVersion = true
+}
+
+task release(dependsOn: ['wrapper', 'clean', 'publishToMavenLocal']) {
+ group = 'Publishing'
+ description = 'Releases new version to local maven repository.'
+ doFirst {
+ println("Version: $version")
+ }
+}
+
+task pandoc(type: Exec) {
+ group = 'Documentation'
+ def pandoc_args = ['--from', 'markdown_github',
+ '--to', 'html5',
+ '-s',
+ '-c', 'github-pandoc.css',
+ '-o', 'docs/README.html',
+ 'README.md']
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine(['cmd', '/c', 'pandoc'] + pandoc_args)
+ } else {
+ executable 'pandoc'
+ args pandoc_args
+ }
+ standardOutput = new ByteArrayOutputStream()
+ ext.output = {
+ return standardOutput.toString()
+ }
+}
diff --git a/clean.sh b/clean.sh
new file mode 100755
index 0000000..552252d
--- /dev/null
+++ b/clean.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+DEBUG=false
+
+rm="rm -rf"
+
+if [ "$DEBUG" = true ]; then
+ rm="echo rm -rf"
+fi
+
+buildkt="kobalt/src/Build.kt"
+
+name=$(cat $buildkt | grep -m 1 "name = " | cut -d"\"" -f 2)
+group=$(cat $buildkt | grep -m 1 "group = " | cut -d"\"" -f 2)
+
+if [ -z "$1" ]; then
+ version=$(cat $buildkt | grep -m 1 "version = " | cut -d"\"" -f 2)
+else
+ version="$1"
+fi
+
+maven="/k/maven/repository/${group//.//}/${name}/${version}"
+kobalt="$HOME/.kobalt/cache/${group//.//}/${name}/${version}"
+localRepo="$HOME/.kobalt/localMavenRepo/${group//.//}/${name}/${version}"
+
+read -p "Delete version ${version}? " -n 1 -r
+echo
+if [[ $REPLY =~ ^[Yy]$ ]]; then
+ for dir in "$kobalt" "$maven" "$localRepo"; do
+ if [ -d "$dir" ]; then
+ echo -e "Deleting : \e[32;1m$dir\e[0m"
+ $rm "$dir"
+ else
+ echo -e "Not Found: \e[31;1m$dir\e[0m"
+ fi
+ done
+fi
\ No newline at end of file
diff --git a/config/pmd.xml b/config/pmd.xml
deleted file mode 100644
index 2641880..0000000
--- a/config/pmd.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
- Erik's Ruleset
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/config/spotbugs/excludeFilter.xml b/config/spotbugs/excludeFilter.xml
new file mode 100644
index 0000000..ddb2db1
--- /dev/null
+++ b/config/spotbugs/excludeFilter.xml
@@ -0,0 +1,16 @@
+
+
+
+
diff --git a/docs/README.html b/docs/README.html
index 3101738..a53c851 100644
--- a/docs/README.html
+++ b/docs/README.html
@@ -1,218 +1,91 @@
-
+
-
-
-
- Semantic Version Annotation Processor
-
+
-
+
-
An annotation processor that automatically generates a GeneratedVersion class based on a Mustache template and containing the semantic version (major, minor, patch, etc.) that is read from a Properties file or defined in the annotation.
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 in the project's root directory. The
-processor will automatically look for it.
+
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 in the project's root directory. The processor will automatically look for it.
To specify your own template name, use:
-
@Version(template ="version.mustache")
-publicclass A {
-// ...
-}
+
@Version(template = "version.mustache")
+publicclass A {
+// ...
⚠️
-keysPrefix is a new element staring in 1.1.0
-and may break older versions when using custom property keys.
-⚡ A quick fix is to include
-keysPrefix="" in the annotation to remove the default
-version. prefix.
+
⚠️ keysPrefix is a new element in 1.1.0 and may break older versions when using custom property keys.
+⚡ A quick fix is to include keysPrefix="" in the annotation to remove the default version. prefix.
-
Maven
-
To install and run from Maven, configure an artifact as
-follows:
Please look at ExampleBuild
-in the examples/java/bld
-directory for a sample. It also shows how to incorporate the generated
-code into the source tree, more information is also
-available here.
-
bld also has a Generated
-Version extension which provides similar functionalities.
The directory containing the configuration files
-(version.properties, version.mustache) must be
-specified using the semver.project.dir processor
-argument.
-
The GeneratedVersion.java
-class will be automatically created in the build/generated
-directory upon compiling.
The directory containing the configuration files
-(version.properties, version.mustache) must be
-specified using the semver.project.dir processor
-argument.
+
Usage with Maven, Grail, Kobalt and Kotlin
+
Maven
+
To install and run from Maven, configure an artifact as follows:
Incrementing the version is best left to your favorite build system.
-For a solution using Gradle, please have a look at the Semver Version
-Plugin for Gradle.
-
There are also full examples
-in both Java
-and Kotlin
-showing how to use both the plugin and annotation processor
-concurrently.
-
Contributing
-
If you want to contribute to this project, all you have to do is
-clone the GitHub repository:
The project has an IntelliJ
-IDEA project structure. You can just open it after all the
-dependencies were downloaded and peruse the code.
+
Incrementing the version is best left to your favorite build system. For a solution using Gradle, please have a look at the Semver Version Plugin for Gradle.
+
There are also full examples in both Java and Kotlin showing how to use both the plugin and annotation processor concurrently.
diff --git a/examples/.gitignore b/examples/.gitignore
new file mode 100644
index 0000000..91cf804
--- /dev/null
+++ b/examples/.gitignore
@@ -0,0 +1,32 @@
+**/.idea/dictionaries
+**/.idea/gradle.xml
+**/.idea/libraries
+**/.idea/tasks.xml
+**/.idea/workspace.xml
+**/src/*.class
+*.code-workspace
+*.iws
+*.properties
+*.sublime-*
+.classpath
+.DS_Store
+.gradle
+.kobalt
+.nb-gradle
+.project
+.settings
+/bin
+/build
+/deploy
+/dist
+/gen
+/gradle.properties
+/local.properties
+/out
+/proguard-project.txt
+/project.properties
+/target
+/test-output
+ehthumbs.db
+kobaltBuild
+Thumbs.db
\ No newline at end of file
diff --git a/examples/examples.sh b/examples/examples.sh
index 514f874..d0895bc 100755
--- a/examples/examples.sh
+++ b/examples/examples.sh
@@ -1,34 +1,17 @@
#!/bin/bash
-# Version 1.0
-
if [ $# -eq 0 ]; then
- echo "Usage: $0 "
- exit 1
+ echo "Usage: $0 [...]"
+ exit 1
fi
-# set the examples directories
-declare -a examples=(
- "java/bld"
- "java/gradle"
- "kotlin")
-
dir=$(dirname "$(readlink -f "$0")")
-cyan=$(tput setaf 6)
+color=$(tput setaf 6)
normal=$(tput sgr0)
-i=0
-for ex in "${examples[@]}"; do
- if [ $i -ne 0 ]; then
- read -p "Press [Enter] key to continue..."
- clear
- fi
- cd "$dir/$ex" || exit 1
- echo "> Project: ${cyan}${ex}${normal}"
- if [ -x "bld" ]; then
- ./bld compile "$@" || exit 1
- else
- ./gradlew --console=plain --no-build-cache clean "$@" || exit 1
- fi
- ((i++))
-done
+for ex in "java" "kotlin"; do
+ cd "$dir/$ex" || exit 1
+ echo "> Project: ${color}${ex}${normal}"
+ gradle clean "$@" --console=plain --no-build-cache || exit 1
+ echo
+done
\ No newline at end of file
diff --git a/examples/java/.editorconfig b/examples/java/.editorconfig
new file mode 100644
index 0000000..a6971e1
--- /dev/null
+++ b/examples/java/.editorconfig
@@ -0,0 +1,2 @@
+[*]
+insert_final_newline=true
diff --git a/examples/java/gradle/.gitattributes b/examples/java/.gitattributes
similarity index 100%
rename from examples/java/gradle/.gitattributes
rename to examples/java/.gitattributes
diff --git a/examples/java/.gitignore b/examples/java/.gitignore
new file mode 100644
index 0000000..51e51c5
--- /dev/null
+++ b/examples/java/.gitignore
@@ -0,0 +1,28 @@
+**/.idea/dictionaries
+**/.idea/gradle.xml
+**/.idea/libraries
+**/.idea/tasks.xml
+**/.idea/workspace.xml
+*.iws
+.DS_Store
+.classpath
+.gradle
+.kobalt
+.nb-gradle
+.project
+.settings
+/bin
+/build
+/deploy
+/dist
+/gen
+/gradle.properties
+/libs
+/local.properties
+/out
+/proguard-project.txt
+/project.properties
+/test-output
+Thumbs.db
+ehthumbs.db
+kobaltBuild
\ No newline at end of file
diff --git a/examples/java/.idea/.name b/examples/java/.idea/.name
new file mode 100644
index 0000000..1658a34
--- /dev/null
+++ b/examples/java/.idea/.name
@@ -0,0 +1 @@
+examples-java
\ No newline at end of file
diff --git a/examples/java/.idea/compiler.xml b/examples/java/.idea/compiler.xml
new file mode 100644
index 0000000..f0a6a7b
--- /dev/null
+++ b/examples/java/.idea/compiler.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/bld.xml b/examples/java/.idea/encodings.xml
similarity index 54%
rename from .idea/bld.xml
rename to examples/java/.idea/encodings.xml
index 6600cee..97626ba 100644
--- a/.idea/bld.xml
+++ b/examples/java/.idea/encodings.xml
@@ -1,6 +1,6 @@
-
-
+
+
\ No newline at end of file
diff --git a/examples/java/gradle/.idea/inspectionProfiles/Project_Default.xml b/examples/java/.idea/inspectionProfiles/Project_Default.xml
similarity index 100%
rename from examples/java/gradle/.idea/inspectionProfiles/Project_Default.xml
rename to examples/java/.idea/inspectionProfiles/Project_Default.xml
diff --git a/examples/java/.idea/misc.xml b/examples/java/.idea/misc.xml
new file mode 100644
index 0000000..e707cdd
--- /dev/null
+++ b/examples/java/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/java/.idea/modules.xml b/examples/java/.idea/modules.xml
new file mode 100644
index 0000000..e27b37a
--- /dev/null
+++ b/examples/java/.idea/modules.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/java/.idea/modules/examples-java.iml b/examples/java/.idea/modules/examples-java.iml
new file mode 100644
index 0000000..a57fa1a
--- /dev/null
+++ b/examples/java/.idea/modules/examples-java.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/java/.idea/modules/examples-java_main.iml b/examples/java/.idea/modules/examples-java_main.iml
new file mode 100644
index 0000000..f9a8e31
--- /dev/null
+++ b/examples/java/.idea/modules/examples-java_main.iml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/java/.idea/modules/examples-java_test.iml b/examples/java/.idea/modules/examples-java_test.iml
new file mode 100644
index 0000000..a6695cc
--- /dev/null
+++ b/examples/java/.idea/modules/examples-java_test.iml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/java/bld/.gitignore b/examples/java/bld/.gitignore
deleted file mode 100644
index b53292f..0000000
--- a/examples/java/bld/.gitignore
+++ /dev/null
@@ -1,56 +0,0 @@
-.gradle
-.DS_Store
-build
-lib/bld/**
-!lib/bld/bld-wrapper.jar
-!lib/bld/bld-wrapper.properties
-lib/compile/
-lib/provided/
-lib/runtime/
-lib/standalone/
-lib/test/
-
-# IDEA ignores
-
-# User-specific
-.idea/**/workspace.xml
-.idea/**/tasks.xml
-.idea/**/usage.statistics.xml
-.idea/**/dictionaries
-.idea/**/shelf
-
-# AWS User-specific
-.idea/**/aws.xml
-
-# Generated files
-.idea/**/contentModel.xml
-
-# Sensitive or high-churn files
-.idea/**/dataSources/
-.idea/**/dataSources.ids
-.idea/**/dataSources.local.xml
-.idea/**/sqlDataSources.xml
-.idea/**/dynamic.xml
-.idea/**/uiDesigner.xml
-.idea/**/dbnavigator.xml
-
-# Gradle
-.idea/**/gradle.xml
-
-# Mongo Explorer plugin
-.idea/**/mongoSettings.xml
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Cursive Clojure plugin
-.idea/replstate.xml
-
-# SonarLint plugin
-.idea/sonarlint/
-
-# Editor-based Rest Client
-.idea/httpRequests
\ No newline at end of file
diff --git a/examples/java/bld/.idea/.gitignore b/examples/java/bld/.idea/.gitignore
deleted file mode 100644
index 26d3352..0000000
--- a/examples/java/bld/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/examples/java/bld/.idea/.name b/examples/java/bld/.idea/.name
deleted file mode 100644
index 4bd9ff6..0000000
--- a/examples/java/bld/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-semver-examples-bld
\ No newline at end of file
diff --git a/examples/java/bld/.idea/app.iml b/examples/java/bld/.idea/app.iml
deleted file mode 100644
index 082bb1c..0000000
--- a/examples/java/bld/.idea/app.iml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/bld.iml b/examples/java/bld/.idea/bld.iml
deleted file mode 100644
index e63e11e..0000000
--- a/examples/java/bld/.idea/bld.iml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/bld.xml b/examples/java/bld/.idea/bld.xml
deleted file mode 100644
index 6600cee..0000000
--- a/examples/java/bld/.idea/bld.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/inspectionProfiles/Project_Default.xml b/examples/java/bld/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 1e01b48..0000000
--- a/examples/java/bld/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/intellij-javadocs-4.0.1.xml b/examples/java/bld/.idea/intellij-javadocs-4.0.1.xml
deleted file mode 100644
index 7653cff..0000000
--- a/examples/java/bld/.idea/intellij-javadocs-4.0.1.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
-
- UPDATE
- false
- true
-
- METHOD
- TYPE
- FIELD
-
-
- PUBLIC
- DEFAULT
- PROTECTED
-
-
-
-
-
- ^.*(public|protected|private)*.+interface\s+\w+.*
- /**\n
- * The interface ${name}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
- */
-
-
- ^.*(public|protected|private)*.+enum\s+\w+.*
- /**\n
- * The enum ${name}.\n
- */
-
-
- ^.*(public|protected|private)*.+class\s+\w+.*
- /**\n
- * The type ${name}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
- */
-
-
- .+
- /**\n
- * The type ${name}.\n
- */
-
-
-
-
- .+
- /**\n
- * Instantiates a new ${name}.\n
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
-
-
- ^.*(public|protected|private)*\s*.*(\w(\s*<.+>)*)+\s+get\w+\s*\(.*\).+
- /**\n
- * Gets ${partName}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if isNotVoid>
- *\n
- * @return the ${partName}\n
-</#if>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
- ^.*(public|protected|private)*\s*.*(void|\w(\s*<.+>)*)+\s+set\w+\s*\(.*\).+
- /**\n
- * Sets ${partName}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if isNotVoid>
- *\n
- * @return the ${partName}\n
-</#if>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
- ^.*((public\s+static)|(static\s+public))\s+void\s+main\s*\(\s*String\s*(\[\s*\]|\.\.\.)\s+\w+\s*\).+
- /**\n
- * The entry point of application.\n
-
- <#if element.parameterList.parameters?has_content>
- *\n
-</#if>
- * @param ${element.parameterList.parameters[0].name} the input arguments\n
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
- .+
- /**\n
- * ${name}<#if isNotVoid> ${return}</#if>.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if isNotVoid>
- *\n
- * @return the ${return}\n
-</#if>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
-
-
- ^.*(public|protected|private)*.+static.*(\w\s\w)+.+
- /**\n
- * The constant ${element.getName()}.\n
- */
-
-
- ^.*(public|protected|private)*.*(\w\s\w)+.+
- /**\n
- <#if element.parent.isInterface()>
- * The constant ${element.getName()}.\n
-<#else>
- * The ${name}.\n
-</#if> */
-
-
- .+
- /**\n
- <#if element.parent.isEnum()>
- *${name} ${typeName}.\n
-<#else>
- * The ${name}.\n
-</#if>*/
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/libraries/bld.xml b/examples/java/bld/.idea/libraries/bld.xml
deleted file mode 100644
index 153a060..0000000
--- a/examples/java/bld/.idea/libraries/bld.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/java/bld/.idea/libraries/compile.xml b/examples/java/bld/.idea/libraries/compile.xml
deleted file mode 100644
index 5316b95..0000000
--- a/examples/java/bld/.idea/libraries/compile.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/libraries/runtime.xml b/examples/java/bld/.idea/libraries/runtime.xml
deleted file mode 100644
index d4069f2..0000000
--- a/examples/java/bld/.idea/libraries/runtime.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/libraries/test.xml b/examples/java/bld/.idea/libraries/test.xml
deleted file mode 100644
index 05f52ce..0000000
--- a/examples/java/bld/.idea/libraries/test.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/misc.xml b/examples/java/bld/.idea/misc.xml
deleted file mode 100644
index 5238960..0000000
--- a/examples/java/bld/.idea/misc.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/modules.xml b/examples/java/bld/.idea/modules.xml
deleted file mode 100644
index 55adcb9..0000000
--- a/examples/java/bld/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/runConfigurations/Run Tests.xml b/examples/java/bld/.idea/runConfigurations/Run Tests.xml
deleted file mode 100644
index 2b503e5..0000000
--- a/examples/java/bld/.idea/runConfigurations/Run Tests.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.idea/vcs.xml b/examples/java/bld/.idea/vcs.xml
deleted file mode 100644
index c2365ab..0000000
--- a/examples/java/bld/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/java/bld/.vscode/launch.json b/examples/java/bld/.vscode/launch.json
deleted file mode 100644
index 30a8889..0000000
--- a/examples/java/bld/.vscode/launch.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "version": "0.2.0",
- "configurations": [
- {
- "type": "java",
- "name": "Run Tests",
- "request": "launch",
- "mainClass": "com.example.ExampleTest"
- }
- ]
-}
diff --git a/examples/java/bld/.vscode/settings.json b/examples/java/bld/.vscode/settings.json
deleted file mode 100644
index ba429d0..0000000
--- a/examples/java/bld/.vscode/settings.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "java.project.sourcePaths": [
- "src/main/java",
- "src/main/resources",
- "src/test/java",
- "src/test/resources",
- "src/bld/java",
- "src/bld/resources"
- ],
- "java.configuration.updateBuildConfiguration": "automatic",
- "java.project.referencedLibraries": [
- "${HOME}/.bld/dist/bld-2.2.1.jar",
- "lib/**/*.jar"
- ]
-}
diff --git a/examples/java/bld/README.md b/examples/java/bld/README.md
deleted file mode 100644
index d1f800f..0000000
--- a/examples/java/bld/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-## Examples
-
-To compile & run the examples:
-
-```console
-./bld compile
-
-./bld run
-./bld run-example
-```
diff --git a/examples/java/bld/bld b/examples/java/bld/bld
deleted file mode 100755
index 80d2986..0000000
--- a/examples/java/bld/bld
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env sh
-java -jar "$(dirname "$0")/lib/bld/bld-wrapper.jar" "$0" --build com.example.ExampleBuild "$@"
\ No newline at end of file
diff --git a/examples/java/bld/bld.bat b/examples/java/bld/bld.bat
deleted file mode 100644
index 084bb72..0000000
--- a/examples/java/bld/bld.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-@echo off
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-java -jar "%DIRNAME%/lib/bld/bld-wrapper.jar" "%0" --build com.example.ExampleBuild %*
\ No newline at end of file
diff --git a/examples/java/bld/example.mustache b/examples/java/bld/example.mustache
deleted file mode 100644
index 70125c1..0000000
--- a/examples/java/bld/example.mustache
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * This file is automatically generated.
- * Do not modify! -- ALL CHANGES WILL BE ERASED!
- */
-
-package {{packageName}};
-
-import java.util.Date;
-
-public final class {{className}} {
- public static final String PROJECT = "{{project}}";
- public static final Date BUILDDATE = new Date({{epoch}}L);
- public static final String VERSION = "{{version}}";
-
- /**
- * Disables the default constructor.
- */
- private {{className}}() {
- throw new UnsupportedOperationException("Illegal constructor call.");
- }
-}
diff --git a/examples/java/bld/example.properties b/examples/java/bld/example.properties
deleted file mode 100644
index d0b5ce4..0000000
--- a/examples/java/bld/example.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Generated by the Semver Plugin for Gradle
-#Sat Apr 27 17:04:13 PDT 2019
-example.buildmeta=T800
-example.major=8
-example.minor=4
-example.patch=97
-example.prerelease=alpha
-example.project=Java Example
-example.semver=8.4.97-alpha+T800
diff --git a/examples/java/bld/lib/bld/bld-wrapper.jar b/examples/java/bld/lib/bld/bld-wrapper.jar
deleted file mode 100644
index ecc7a41..0000000
Binary files a/examples/java/bld/lib/bld/bld-wrapper.jar and /dev/null differ
diff --git a/examples/java/bld/lib/bld/bld-wrapper.properties b/examples/java/bld/lib/bld/bld-wrapper.properties
deleted file mode 100644
index 78bca2d..0000000
--- a/examples/java/bld/lib/bld/bld-wrapper.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-bld.downloadExtensionJavadoc=false
-bld.downloadExtensionSources=true
-bld.downloadLocation=
-bld.extensions=
-bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
-bld.sourceDirectories=
-bld.version=2.2.1
diff --git a/examples/java/bld/src/bld/java/com/example/ExampleBuild.java b/examples/java/bld/src/bld/java/com/example/ExampleBuild.java
deleted file mode 100644
index 9c4199d..0000000
--- a/examples/java/bld/src/bld/java/com/example/ExampleBuild.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.example;
-
-import rife.bld.BuildCommand;
-import rife.bld.Project;
-import rife.bld.operations.JavacOptions.Processing;
-
-import java.io.File;
-import java.util.List;
-
-import static rife.bld.dependencies.Repository.*;
-import static rife.bld.dependencies.Scope.provided;
-
-/**
- * Example build.
- */
-public class ExampleBuild extends Project {
- public ExampleBuild() {
- pkg = "com.example";
- name = "Example";
- version = version(0, 1, 0);
-
- mainClass = "com.example.App";
-
- testOperation().mainClass("com.example.ExampleTest");
-
- repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);
-
- scope(provided).include(dependency("net.thauvin.erik", "semver", version(1, 2, 2, "SNAPSHOT")));
- }
-
- public static void main(String[] args) {
- new ExampleBuild().start(args);
- }
-
- /**
- * Saves generated source files in the {@code build/generated} directory.
- *