-
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c98f120..55adcb9 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -4,7 +4,6 @@
-
\ No newline at end of file
diff --git a/.idea/modules/examples-java.main.iml b/.idea/modules/examples-java.main.iml
deleted file mode 100644
index 807b620..0000000
--- a/.idea/modules/examples-java.main.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations/Run Tests.xml b/.idea/runConfigurations/Run Tests.xml
index 4f6af10..5c0ca65 100644
--- a/.idea/runConfigurations/Run Tests.xml
+++ b/.idea/runConfigurations/Run Tests.xml
@@ -1,7 +1,11 @@
-
-
+
+
+
+
+
+
diff --git a/.idea/scopes/Source_Code.xml b/.idea/scopes/Source_Code.xml
deleted file mode 100644
index 1753056..0000000
--- a/.idea/scopes/Source_Code.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index 7a56afd..0000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "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
deleted file mode 100644
index b676049..0000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "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 3214597..ae2f49e 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2016-2023, Erik C. Thauvin (erik@thauvin.net)
+Copyright (c) 2016-2024, 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 19c03d3..cada04f 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/gradle.yml)
+[](https://github.com/ethauvin/semver/actions/workflows/bld.yml)
[](https://ci.appveyor.com/project/ethauvin/semver)
[](https://circleci.com/gh/ethauvin/semver/tree/master)
@@ -18,19 +18,22 @@ This processor was inspired by Cédric Beust's [version-processor](https://githu
## 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)
+- [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
@@ -134,8 +137,6 @@ 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:
@@ -202,12 +203,13 @@ To install and run from [Maven](https://maven.apache.org/), configure an artifac
```
-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
+```console
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:
@@ -224,6 +226,8 @@ 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
@@ -296,7 +300,7 @@ dependencies {
kapt {
arguments {
- arg("semver.project.dir", projectDir)
+ arg("semver.project.dir", projectDir.absolutePath)
}
}
```
@@ -308,3 +312,22 @@ 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 d074b20..2641880 100644
--- a/config/pmd.xml
+++ b/config/pmd.xml
@@ -7,8 +7,9 @@
-
-
+
+
+
@@ -23,17 +24,20 @@
-
+
+
+
-
+
+
@@ -49,8 +53,6 @@
-
-
@@ -77,7 +79,6 @@
-
@@ -93,13 +94,6 @@
-
-
-
- ^ignore$
-
-
-
diff --git a/docs/README.html b/docs/README.html
index 1dad205..3101738 100644
--- a/docs/README.html
+++ b/docs/README.html
@@ -11,8 +11,11 @@
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;}
- ul.task-list{list-style: none;}
+ /* 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 li input[type="checkbox"] {
+ font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
@@ -97,7 +100,7 @@ alt="License (3-Clause BSD)" />
The following annotation elements and properties are available:
@@ -546,6 +546,9 @@ 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
@@ -643,5 +646,15 @@ 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: