-
\ No newline at end of file
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 55adcb9..c98f120 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -4,6 +4,7 @@
+
\ No newline at end of file
diff --git a/.idea/modules/examples-java.main.iml b/.idea/modules/examples-java.main.iml
new file mode 100644
index 0000000..807b620
--- /dev/null
+++ b/.idea/modules/examples-java.main.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/Run Tests.xml b/.idea/runConfigurations/Run Tests.xml
index 5c0ca65..4f6af10 100644
--- a/.idea/runConfigurations/Run Tests.xml
+++ b/.idea/runConfigurations/Run Tests.xml
@@ -1,11 +1,7 @@
-
+
+
-
-
-
-
-
diff --git a/.idea/scopes/Source_Code.xml b/.idea/scopes/Source_Code.xml
new file mode 100644
index 0000000..1753056
--- /dev/null
+++ b/.idea/scopes/Source_Code.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..7a56afd
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,11 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "java",
+ "name": "Run Tests",
+ "request": "launch",
+ "mainClass": "net.thauvin.erik.semver.SemverTest"
+ }
+ ]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..b676049
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,15 @@
+{
+ "java.project.sourcePaths": [
+ "src/main/java",
+ "src/main/resources",
+ "src/test/java",
+ "src/bld/java"
+ ],
+ "java.configuration.updateBuildConfiguration": "automatic",
+ "java.project.referencedLibraries": [
+ "${HOME}bld-1.7.2.jar",
+ "lib/compile/*.jar",
+ "lib/runtime/*.jar",
+ "lib/test/*.jar"
+ ]
+}
diff --git a/LICENSE.txt b/LICENSE.txt
index ae2f49e..3214597 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2016-2024, Erik C. Thauvin (erik@thauvin.net)
+Copyright (c) 2016-2023, Erik C. Thauvin (erik@thauvin.net)
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/README.md b/README.md
index cada04f..19c03d3 100644
--- a/README.md
+++ b/README.md
@@ -2,13 +2,13 @@
[](https://opensource.org/licenses/BSD-3-Clause)
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
-[](https://rife2.com/bld)
+[](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)
[](https://sonarcloud.io/dashboard?id=ethauvin_semver)
-[](https://github.com/ethauvin/semver/actions/workflows/bld.yml)
+[](https://github.com/ethauvin/semver/actions/workflows/gradle.yml)
[](https://ci.appveyor.com/project/ethauvin/semver)
[](https://circleci.com/gh/ethauvin/semver/tree/master)
@@ -18,22 +18,19 @@ This processor was inspired by Cédric Beust's [version-processor](https://githu
## 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](#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)
## Examples
@@ -137,6 +134,8 @@ The mustache variables automatically filled in by the processor are:
| `{{separator}}` | The version separator. | `String` |
| `{{semver}}` or `{{version}}` | The full semantic 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:
@@ -203,13 +202,12 @@ To install and run from [Maven](https://maven.apache.org/), configure an artifac
```
-```console
+Please look at [pom.xml](https://github.com/ethauvin/semver/blob/master/examples/java/pom.xml) in the [examples/java](https://github.com/ethauvin/semver/tree/master/examples/java) directory for a sample:
+
+```bash
mvn verify
```
-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:
-
-
## bld
To install and run from [bld](https://rife2.com/bld), just add the dependency to your build file:
@@ -226,8 +224,6 @@ public class ExampleBuild extends Project {
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
@@ -300,7 +296,7 @@ dependencies {
kapt {
arguments {
- arg("semver.project.dir", projectDir.absolutePath)
+ arg("semver.project.dir", projectDir)
}
}
```
@@ -312,22 +308,3 @@ The directory containing the configuration files (`version.properties`, `version
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.
diff --git a/config/pmd.xml b/config/pmd.xml
index 2641880..d074b20 100644
--- a/config/pmd.xml
+++ b/config/pmd.xml
@@ -7,9 +7,8 @@
-
-
-
+
+
@@ -24,20 +23,17 @@
-
+
-
-
-
-
+
@@ -53,6 +49,8 @@
+
+
@@ -79,6 +77,7 @@
+
@@ -94,6 +93,13 @@
+
+
+
+ ^ignore$
+
+
+
diff --git a/docs/README.html b/docs/README.html
index 3101738..1dad205 100644
--- a/docs/README.html
+++ b/docs/README.html
@@ -11,11 +11,8 @@
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
- /* The extra [class] is a hack that increases specificity enough to
- override a similar rule in reveal.js */
- ul.task-list[class]{list-style: none;}
+ ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
- font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
@@ -100,7 +97,7 @@ alt="License (3-Clause BSD)" />
The following annotation elements and properties are available:
@@ -546,9 +546,6 @@ href="https://github.com/ethauvin/semver/tree/master/examples/java/bld">examples
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.
Gradle
Class Generation
To install and run from Gradle, add
@@ -646,15 +643,5 @@ 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: