diff --git a/.circleci/config.yml b/.circleci/config.yml
index 5697c0d..1b19e22 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,42 +1,45 @@
-version: 2.1
+defaults: &defaults
+ working_directory: ~/repo
+ docker:
+ - image: circleci/openjdk:8-jdk
+ environment:
+ JVM_OPTS: -Xmx3200m
+ TERM: dumb
-commands:
- build_and_test:
- parameters:
- reports-dir:
- type: string
- default: "build/reports/test_results"
- steps:
- - checkout
- - run:
- name: Download dependencies
- command: ./bld download
- - run:
- name: Compile source
- command: ./bld compile
- - run:
- name: Run tests
- command: ./bld jacoco -reports-dir=<< parameters.reports-dir >>
- - store_test_results:
- path: << parameters.reports-dir >>
- - store_artifacts:
- path: build/reports/jacoco/test/html
+version: 2.0
jobs:
- bld_jdk17:
- docker:
- - image: cimg/openjdk:17.0
- steps:
- - build_and_test
+ build_gradle:
+ <<: *defaults
- bld_jdk21:
- docker:
- - image: cimg/openjdk:21.0
steps:
- - build_and_test
+ - checkout
+ - restore_cache:
+ keys:
+ - gradle-dependencies-{{ checksum "build.gradle" }}
+ # fallback to using the latest cache if no exact match is found
+ - gradle-dependencies-
+
+ - run:
+ name: Gradle Dependencies
+ command: ./gradlew dependencies
+
+ - save_cache:
+ paths: ~/.m2
+ key: gradle-dependencies-{{ checksum "build.gradle" }}
+
+ - run:
+ name: Run All Checks
+ command: ./gradlew check
+
+ - store_artifacts:
+ path: build/reports/
+ destination: reports
+ - store_test_results:
+ path: build/reports/
workflows:
- bld:
+ version: 2
+ build_gradle_jdk8:
jobs:
- - bld_jdk17
- - bld_jdk21
+ - build_gradle
diff --git a/.editorconfig b/.editorconfig
index 1f808de..a6971e1 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,2 +1,2 @@
[*]
-insert_final_newline = true
+insert_final_newline=true
diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml
deleted file mode 100644
index 64007ef..0000000
--- a/.github/workflows/bld.yml
+++ /dev/null
@@ -1,76 +0,0 @@
-name: bld-ci
-
-on: [push, pull_request, workflow_dispatch]
-
-jobs:
- build-bld-project:
- env:
- COVERAGE_JDK: "17"
-
- strategy:
- matrix:
- java-version: [17, 21, 24]
- os: [ ubuntu-latest, windows-latest, macos-latest ]
-
- runs-on: ${{ matrix.os }}
-
- steps:
- - name: Checkout source repository
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
-
- - name: Set up JDK ${{ matrix.java-version }}
- uses: actions/setup-java@v4
- with:
- distribution: "zulu"
- java-version: ${{ matrix.java-version }}
-
- - name: Download dependencies [bld example]
- working-directory: examples/java/bld
- run: ./bld download
-
- - name: Compile and run [bld example]
- working-directory: examples/java/bld
- run: |
- ./bld compile
- ./bld run
- ./bld run-example
-
- - name: Run example [gradle java examples]
- working-directory: examples/java/gradle
- run: |
- ./gradlew run
- ./gradlew runExample
-
- - name: Run example [gradle kotlin examples]
- working-directory: examples/kotlin
- run: |
- ./gradlew run
- ./gradlew runExample
-
- - name: Download dependencies
- run: ./bld download
-
- - name: Compile source
- run: ./bld compile
-
- - name: Run tests
- run: ./bld jacoco
-
- - name: Remove pom.xml
- if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.os == 'ubuntu-latest'
- run: rm -rf pom.xml
-
- - name: SonarCloud Scan
- uses: sonarsource/sonarcloud-github-action@master
- if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.os == 'ubuntu-latest'
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
-
- - name: Upload coverage reports to Codecov
- uses: codecov/codecov-action@v3
- if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.os == 'ubuntu-latest'
- env:
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github_changelog_generator b/.github_changelog_generator
deleted file mode 100644
index 13dd68d..0000000
--- a/.github_changelog_generator
+++ /dev/null
@@ -1 +0,0 @@
-future-release=1.2.1
diff --git a/.gitignore b/.gitignore
index dd3e0b4..e439b59 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,58 +1,83 @@
-.gradle
+!.vscode/extensions.json
+!.vscode/launch.json
+!.vscode/settings.json
+!.vscode/tasks.json
+!gradle-wrapper.jar
+.classpath
.DS_Store
-build
-lib/bld/**
-!lib/bld/bld-wrapper.properties
-!lib/bld/bld-wrapper.jar
-lib/compile/
-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
+.gradle
+.history
+.idea_modules/
.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/**/dataSources/
.idea/**/dbnavigator.xml
-
-# Gradle
+.idea/**/dictionaries
+.idea/**/dynamic.xml
.idea/**/gradle.xml
-
-# Mongo Explorer plugin
+.idea/**/libraries
.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/**/shelf
+.idea/**/sqlDataSources.xml
+.idea/**/tasks.xml
+.idea/**/uiDesigner.xml
+.idea/**/usage.statistics.xml
+.idea/**/workspace.xml
+.idea/caches/build_file_checksums.ser
.idea/httpRequests
-
+.idea/replstate.xml
+.kobalt
+.mtj.tmp/
+.mvn/timing.properties
+.mvn/wrapper/maven-wrapper.jar
+.nb-gradle
+.project
+.scannerwork
+.settings
+.vscode/*
+*.class
+*.code-workspace
+*.ctxt
+*.ear
+*.iws
+*.jar
+*.log
+*.nar
+*.rar
+*.sublime-*
+*.tar.gz
+*.war
+*.zip
+atlassian-ide-plugin.xml
+bin/
+build/
+buildNumber.properties
+cmake-build-*/
+com_crashlytics_export_strings.xml
+crashlytics-build.properties
+crashlytics.properties
+dependency-reduced-pom.xml
+deploy/
+dist/
+ehthumbs.db
+fabric.properties
+gen/
+gradle.properties
+hs_err_pid*
+kobaltBuild
+kobaltw*-test
+lib/kotlin*
+libs/
local.properties
-target
+out/
+pom.xml.next
+pom.xml.releaseBackup
+pom.xml.tag
+pom.xml.versionsBackup
+proguard-project.txt
+project.properties
+release.properties
+target/
+test-output
+Thumbs.db
diff --git a/.idea/app.iml b/.idea/app.iml
deleted file mode 100644
index 6c0f6d7..0000000
--- a/.idea/app.iml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/bld.iml b/.idea/bld.iml
deleted file mode 100644
index e63e11e..0000000
--- a/.idea/bld.iml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml
new file mode 100644
index 0000000..17101f8
--- /dev/null
+++ b/.idea/checkstyle-idea.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/checkstyleidea-libs/readme.txt b/.idea/checkstyleidea-libs/readme.txt
new file mode 100644
index 0000000..71cc7ff
--- /dev/null
+++ b/.idea/checkstyleidea-libs/readme.txt
@@ -0,0 +1,6 @@
+This folder contains libraries copied from the "semver" project.
+It is managed by the CheckStyle-IDEA IDE plugin.
+Do not modify this folder while the IDE is running.
+When the IDE is stopped, you may delete this folder at any time. It will be recreated as needed.
+In order to prevent the CheckStyle-IDEA IDE plugin from creating this folder,
+uncheck the "Copy libraries from project directory" option in the CheckStyle-IDEA settings dialog.
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..d91f848
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..6d140d3
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/BSD_3_Clause.xml b/.idea/copyright/Erik_s_Copyright_Notice.xml
similarity index 96%
rename from .idea/copyright/BSD_3_Clause.xml
rename to .idea/copyright/Erik_s_Copyright_Notice.xml
index 025a880..ef51a2d 100644
--- a/.idea/copyright/BSD_3_Clause.xml
+++ b/.idea/copyright/Erik_s_Copyright_Notice.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
index 8b4ad55..69bc70d 100644
--- a/.idea/copyright/profiles_settings.xml
+++ b/.idea/copyright/profiles_settings.xml
@@ -1,3 +1,7 @@
-
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/java/gradle/.idea/encodings.xml b/.idea/encodings.xml
similarity index 100%
rename from examples/java/gradle/.idea/encodings.xml
rename to .idea/encodings.xml
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 1e01b48..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..dc2dcae
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ 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..361f8c9 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,16 +1,23 @@
-
-
-
-
-
-
+
+
+
-
+
+
+
+
-
-
+
+
\ 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..487e0be
--- /dev/null
+++ b/.idea/modules/examples-kotlin_main.iml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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..23b6a6d
--- /dev/null
+++ b/.idea/modules/examples-kotlin_test.iml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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/scopes/Copyright.xml b/.idea/scopes/Copyright.xml
new file mode 100644
index 0000000..7fb840b
--- /dev/null
+++ b/.idea/scopes/Copyright.xml
@@ -0,0 +1,3 @@
+
+
+
\ 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..f2a55d1
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,17 @@
+language: java
+
+jdk:
+ - oraclejdk8
+
+addons:
+ sonarcloud:
+ organization: "ethauvin-github"
+
+before_install:
+ - chmod +x gradlew
+
+after_success:
+ - |
+ if [ "${TRAVIS_TEST_RESULT}" == 0 ]; then
+ ./gradlew sonarqube
+ fi
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f1d1e89..a22e047 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,79 +1,48 @@
-# Changelog
+# Change Log
-## [1.2.1](https://github.com/ethauvin/semver/tree/1.2.1) (2023-10-01)
+## [Unreleased](https://github.com/ethauvin/semver/tree/HEAD)
-[Full Changelog](https://github.com/ethauvin/semver/compare/1.2.0...1.2.1)
+[Full Changelog](https://github.com/ethauvin/semver/compare/1.1.1...HEAD)
**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)
+- kapt and Kotlin 1.3.30 require kapt.use.worker.api=true [\#2](https://github.com/ethauvin/semver/issues/2)
## [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)*
+\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE.txt
index ae2f49e..623a991 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2016-2024, Erik C. Thauvin (erik@thauvin.net)
+Copyright (c) 2016-2019, 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..7def683 100644
--- a/README.md
+++ b/README.md
@@ -1,62 +1,48 @@
-# 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://sonarcloud.io/dashboard?id=ethauvin_semver) [](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)
+- [Examples](#examples)
+- [Template](#template)
+ - [Default Template](#default-template)
+ - [Custom Template](#custom-template)
+- [Elements & Properties](#elements--properties)
+- [Usage with Maven, Gradle, Kotlin and Kobalt](#usage-with-maven-gradle-kotlin-and-kobalt)
- [Maven](#maven)
- - [bld](#bld)
- [Gradle](#gradle)
- [Class Generation](#class-generation)
- - [Class \& Source Generation](#class--source-generation)
+ - [Class & Source Generation](#class--source-generation)
- [Kotlin](#kotlin)
- - [Kotlin \& Gradle](#kotlin--gradle)
- - [Auto-Increment](#auto-increment)
- - [Contributing](#contributing)
-
+ - [Kotlin & Gradle](#kotlin--gradle)
+ - [Kobalt](#kobalt)
+- [Auto-Increment](#auto-increment)
+
## 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 +53,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/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](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 +66,26 @@ 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 variables:
-| 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`
+`PRERELASE_PREFIX` | The pre-release prefix | `-`
+`BUILDMETA` | The build metadata, if any. | `001`
+`BUILDMETA_PREFIX` | The metadata prefix. | `+`
+`SEPARATOR` | The version separator. | `.`
### Custom Template
@@ -121,50 +106,52 @@ public final class {{className}} {
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`
+`{{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`
+
+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. |
+`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.`
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 +160,7 @@ In order to easily incorporate with existing projects, the property keys may be
projectKey = "project"
)
public class Example {
- // ...
-}
+// ...
```
```ini
@@ -188,10 +174,12 @@ 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 staring 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, Gradle, Kotlin and Kobalt
+
+### Maven
To install and run from [Maven](https://maven.apache.org/), configure an artifact as follows:
@@ -199,75 +187,44 @@ To install and run from [Maven](https://maven.apache.org/), configure an artifac
net.thauvin.eriksemver
- 1.2.1
+ 1.2.0
```
-```console
+Please look at [pom.xml](https://github.com/ethauvin/semver/blob/master/examples/java/pom.xml) in the [Java example](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:
+### Gradle
+#### 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 `build.gradle`:
```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.2.0'
+ implementation 'net.thauvin.erik:semver:1.2.0'
}
```
-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 `build.gradle`:
```gradle
-tasks.withType(JavaCompile).configureEach {
- options.generatedSourceOutputDirectory.set(file("${projectDir}/src/generated/java"))
-}
+compileJava.options.annotationProcessorGeneratedSourcesDirectory = file("${projectDir}/src/generated/java")
```
-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`.
+The `GeneratedVersion.java` file will now be located in `src/generated`.
-## Kotlin
+Please look at [build.gradle](https://github.com/ethauvin/semver/blob/master/examples/java/build.gradle) in the [Java example](https://github.com/ethauvin/semver/tree/master/examples/java) directory for a sample.
+
+### Kotlin
The annotation processor also supports [Kotlin](https://kotlinlang.org/).
@@ -278,56 +235,55 @@ 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.
+#### Kotlin & Gradle
-### 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):
+To install and run from [Gradle](https://gradle.org/), add the following to `build.gradle.kts`:
```kotlin
-var semverProcessor = "net.thauvin.erik:semver:1.2.1"
+var semverProcessor = "net.thauvin.erik:semver:1.2.0"
dependencies {
kapt(semverProcessor)
- compileOnly(semverProcessor)
+ implementation (semverProcessor)
}
kapt {
arguments {
- arg("semver.project.dir", projectDir.absolutePath)
+ arg("semver.project.dir", projectDir)
}
}
```
-The directory containing the configuration files (`version.properties`, `version.mustache`) must be specified using the `semver.project.dir` processor argument.
+The arguments block is not required if `kapt` is configured to use the Gradle Worker API in `gradle.properties`:
+
+```ini
+kapt.use.worker.api=true
+```
+
+This option will likely be enabled by default in the future, but is currently not working under Java 10+ see [KT-26203](https://youtrack.jetbrains.net/issue/KT-26203).
+
+Please look at the [Kotlin example](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.
+
+### Kobalt
+
+To install and run from [Kobalt](https://beust.com/kobalt/), add the following to `Build.kt`:
+
+```gradle
+dependencies {
+ apt("net.thauvin.erik:semver:1.2.0")
+ compileOnly("net.thauvin.erik:semver:1.2.0")
+}
+```
+
+Please look at [Build.kt](https://github.com/ethauvin/semver/blob/master/examples/java/kobalt/src/Build.kt) in the [Java example](https://github.com/ethauvin/semver/tree/master/examples/java) directory for a sample.
+
## 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.
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 @@
-
-
-
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 {
-// ...
-}
⚠️
-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 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.
-
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, Gradle, Kotlin and Kobalt
+
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.