From 4858c58978cdea500a6c80690513efb153fd705f Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 18 Aug 2023 18:12:44 -0700 Subject: [PATCH] Move from Gradle to bld. Close #7 --- .circleci/config.yml | 53 +- .github/workflows/bld.yml | 53 ++ .github/workflows/gradle.yml | 49 -- .gitignore | 137 ++--- .idea/app.iml | 29 + .idea/bld.iml | 14 + .idea/checkstyle-idea.xml | 18 - .idea/checkstyleidea-libs/readme.txt | 6 - .idea/codeStyles/codeStyleConfig.xml | 5 - .idea/compiler.xml | 10 - .idea/copyright/BSD_3_Clause.xml | 6 + .idea/copyright/Erik_s_Copyright_Notice.xml | 6 - .idea/copyright/profiles_settings.xml | 3 - .idea/encodings.xml | 6 - .idea/inspectionProfiles/Project_Default.xml | 8 + .../inspectionProfiles/profiles_settings.xml | 7 - .idea/jarRepositories.xml | 45 -- .idea/kotlinc.xml | 7 - .idea/libraries-with-intellij-classes.xml | 65 --- .idea/libraries/bld.xml | 17 + .idea/libraries/compile.xml | 13 + .idea/libraries/runtime.xml | 14 + .idea/libraries/test.xml | 14 + .idea/misc.xml | 115 +--- .idea/modules.xml | 9 + .idea/modules/examples-kotlin_main.iml | 41 -- .idea/modules/examples-kotlin_test.iml | 48 -- .idea/runConfigurations/Run Tests.xml | 9 + .idea/scopes/Copyright.xml | 3 - .idea/vcs.xml | 2 +- .vscode/launch.json | 11 + .vscode/settings.json | 15 + README.md | 12 +- appveyor.yml | 9 +- .../javax.annotation.processing.Processor | 33 ++ .../net/thauvin/erik/semver/Constants.class | Bin 0 -> 1771 bytes .../net/thauvin/erik/semver/Version.class | Bin 0 -> 1302 bytes .../net/thauvin/erik/semver/VersionInfo.class | Bin 0 -> 4393 bytes .../erik/semver/VersionProcessor.class | Bin 0 -> 13084 bytes bin/main/net/thauvin/erik/semver/package.html | 12 + bin/main/semver-kt.mustache | 38 ++ bin/main/semver.mustache | 34 ++ .../thauvin/erik/semver/ConstantsTest.class | Bin 0 -> 1583 bytes .../thauvin/erik/semver/VersionInfoTest.class | Bin 0 -> 5276 bytes .../erik/semver/VersionProcessorTest.class | Bin 0 -> 2718 bytes .../net/thauvin/erik/semver/VersionTest.class | Bin 0 -> 2517 bytes bld | 2 + bld.bat | 4 + build.gradle | 221 -------- config/pmd.xml | 1 - docs/README.html | 517 +++++++++++------- gradle.properties | 0 gradlew | 248 --------- gradlew.bat | 92 ---- lib/bld/bld-wrapper.jar | Bin 0 -> 27266 bytes lib/bld/bld-wrapper.properties | 9 + pandoc.sh | 9 + pom.xml | 38 ++ preflightcheck.sh | 201 ------- settings.gradle | 19 - sonar-project.properties | 7 + .../net/thauvin/erik/semver/SemverBuild.java | 147 +++++ .../net/thauvin/erik/semver/Constants.java | 3 +- .../java/net/thauvin/erik/semver/Version.java | 2 +- .../net/thauvin/erik/semver/VersionInfo.java | 204 +++---- .../thauvin/erik/semver/VersionProcessor.java | 28 +- .../java/net/thauvin/erik/semver/package.html | 32 -- .../javax.annotation.processing.Processor | 32 ++ src/main/resources/semver-kt.mustache | 60 +- src/main/resources/semver.mustache | 50 +- .../thauvin/erik/semver/ConstantsTest.java | 4 +- .../thauvin/erik/semver/VersionInfoTest.java | 4 +- .../erik/semver/VersionProcessorTest.java | 4 +- .../net/thauvin/erik/semver/VersionTest.java | 2 +- updatewrappers.sh | 60 -- 75 files changed, 1183 insertions(+), 1793 deletions(-) create mode 100644 .github/workflows/bld.yml delete mode 100644 .github/workflows/gradle.yml create mode 100644 .idea/app.iml create mode 100644 .idea/bld.iml delete mode 100644 .idea/checkstyle-idea.xml delete mode 100644 .idea/checkstyleidea-libs/readme.txt delete mode 100644 .idea/codeStyles/codeStyleConfig.xml delete mode 100644 .idea/compiler.xml create mode 100644 .idea/copyright/BSD_3_Clause.xml delete mode 100644 .idea/copyright/Erik_s_Copyright_Notice.xml delete mode 100644 .idea/copyright/profiles_settings.xml delete mode 100644 .idea/encodings.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml delete mode 100644 .idea/jarRepositories.xml delete mode 100644 .idea/kotlinc.xml delete mode 100644 .idea/libraries-with-intellij-classes.xml create mode 100644 .idea/libraries/bld.xml create mode 100644 .idea/libraries/compile.xml create mode 100644 .idea/libraries/runtime.xml create mode 100644 .idea/libraries/test.xml create mode 100644 .idea/modules.xml delete mode 100644 .idea/modules/examples-kotlin_main.iml delete mode 100644 .idea/modules/examples-kotlin_test.iml create mode 100644 .idea/runConfigurations/Run Tests.xml delete mode 100644 .idea/scopes/Copyright.xml create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 bin/main/META-INF/services/javax.annotation.processing.Processor create mode 100644 bin/main/net/thauvin/erik/semver/Constants.class create mode 100644 bin/main/net/thauvin/erik/semver/Version.class create mode 100644 bin/main/net/thauvin/erik/semver/VersionInfo.class create mode 100644 bin/main/net/thauvin/erik/semver/VersionProcessor.class create mode 100644 bin/main/net/thauvin/erik/semver/package.html create mode 100644 bin/main/semver-kt.mustache create mode 100644 bin/main/semver.mustache create mode 100644 bin/test/net/thauvin/erik/semver/ConstantsTest.class create mode 100644 bin/test/net/thauvin/erik/semver/VersionInfoTest.class create mode 100644 bin/test/net/thauvin/erik/semver/VersionProcessorTest.class create mode 100644 bin/test/net/thauvin/erik/semver/VersionTest.class create mode 100755 bld create mode 100644 bld.bat delete mode 100644 build.gradle delete mode 100644 gradle.properties delete mode 100755 gradlew delete mode 100644 gradlew.bat create mode 100644 lib/bld/bld-wrapper.jar create mode 100644 lib/bld/bld-wrapper.properties create mode 100755 pandoc.sh create mode 100644 pom.xml delete mode 100755 preflightcheck.sh delete mode 100644 settings.gradle create mode 100644 sonar-project.properties create mode 100644 src/bld/java/net/thauvin/erik/semver/SemverBuild.java delete mode 100755 updatewrappers.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 64d62be..65723f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,54 +1,41 @@ -version: 2 +inversion: 2 defaults: &defaults working_directory: ~/repo environment: JVM_OPTS: -Xmx3200m TERM: dumb - CI: true + CI_NAME: "CircleCI" -defaults_gradle: &defaults_gradle +defaults_gradle: &defaults_bld steps: - checkout - - restore_cache: - keys: - - gradle-dependencies-{{ checksum "build.gradle.kts" }} - # 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.kts" }} + name: Download the dependencies + command: ./bld download - run: - name: Run All Checks - command: ./gradlew check - - store_artifacts: - path: build/reports/ - destination: reports - - store_test_results: - path: build/reports/ + name: Run tests with bld + command: ./bld compile test jobs: - build_gradle_jdk17: + bld_jdk20: + <<: *defaults + + docker: + - image: cimg/openjdk:20.0 + + <<: *defaults_bld + + bld_jdk17: <<: *defaults docker: - image: cimg/openjdk:17.0 - <<: *defaults_gradle - - build_gradle_jdk11: - <<: *defaults - - docker: - - image: cimg/openjdk:11.0 - - <<: *defaults_gradle + <<: *defaults_bld workflows: version: 2 - gradle: + bld: jobs: - - build_gradle_jdk20 - - build_gradle_jdk17 + - bld_jdk17 + - bld_jdk20 diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml new file mode 100644 index 0000000..79093d1 --- /dev/null +++ b/.github/workflows/bld.yml @@ -0,0 +1,53 @@ +name: bld-ci + +on: [ push, pull_request, workflow_dispatch ] + +jobs: + build-bld-project: + runs-on: ubuntu-latest + + env: + COVERAGE_SDK: "17" + + strategy: + matrix: + java-version: [ 17, 20 ] + + steps: + - name: Checkout source repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: ${{ matrix.java-version }} + + - name: Grant execute permission for bld + run: chmod +x bld + + - name: Download the dependencies + run: ./bld download + + - name: Run tests with bld + run: ./bld compile jacoco + + - name: Remove pom.xml + if: success() && matrix.java-version == env.COVERAGE_SDK + run: rm -rf pom.xml + + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + if: success() && matrix.java-version == env.COVERAGE_SDK + 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_SDK + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml deleted file mode 100644 index 13384a8..0000000 --- a/.github/workflows/gradle.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: gradle-ci - -on: [ push, pull_request, workflow_dispatch ] - -jobs: - build: - runs-on: ubuntu-latest - - env: - GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m" - SONAR_JDK: "17" - - strategy: - matrix: - java-version: [ 17, 20 ] - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up JDK ${{ matrix.java-version }} - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: ${{ matrix.java-version }} - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Cache SonarCloud packages - if: matrix.java-version == env.SONAR_JDK - uses: actions/cache@v3 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - - name: Test with Gradle - uses: gradle/gradle-build-action@v2 - with: - arguments: build check --stacktrace - - - name: SonarCloud - if: success() && matrix.java-version == env.SONAR_JDK - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./gradlew sonar --info diff --git a/.gitignore b/.gitignore index 097f727..091e664 100644 --- a/.gitignore +++ b/.gitignore @@ -1,84 +1,57 @@ - -!.vscode/extensions.json -!.vscode/launch.json -!.vscode/settings.json -!.vscode/tasks.json -*.class -*.code-workspace -*.ctxt -*.iws -*.log -*.nar -*.rar -*.sublime-* -*.tar.gz -*.zip -.DS_Store -.classpath .gradle -.history -.kobalt -.mtj.tmp/ -.mvn/timing.properties -.mvn/wrapper/maven-wrapper.jar -.nb-gradle -.project -.scannerwork -.settings -.vscode/* -/**/.idea/$CACHE_FILE$ -/**/.idea/$PRODUCT_WORKSPACE_FILE$ -/**/.idea/**/caches/build_file_checksums.ser -/**/.idea/**/contentModel.xml -/**/.idea/**/dataSources.ids -/**/.idea/**/dataSources.local.xml -/**/.idea/**/dataSources/ -/**/.idea/**/dbnavigator.xml -/**/.idea/**/dictionaries -/**/.idea/**/dynamic.xml -/**/.idea/**/gradle.xml -/**/.idea/**/httpRequests -/**/.idea/**/libraries -/**/.idea/**/mongoSettings.xml -/**/.idea/**/replstate.xml -/**/.idea/**/shelf -/**/.idea/**/shelf/ -/**/.idea/**/sqlDataSources.xml -/**/.idea/**/tasks.xml -/**/.idea/**/uiDesigner.xml -/**/.idea/**/usage.statistics.xml -/**/.idea/**/workspace.xml -/**/.idea/sonarlint* -/**/.idea_modules/ -Thumbs.db -__pycache__ +.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 +.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 -bin/ -build/ -cmake-build-*/ -com_crashlytics_export_strings.xml -crashlytics-build.properties -crashlytics.properties -dependency-reduced-pom.xml -deploy/ -dist/ -ehthumbs.db -fabric.properties -gen/ -hs_err_pid* -kobaltBuild -kobaltw*-test -lib/kotlin* -libs/ -local.properties -out/ -pom.xml.next -pom.xml.releaseBackup -pom.xml.tag -pom.xml.versionsBackup -proguard-project.txt -project.properties -release.properties -target/ -test-output -venv + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Editor-based Rest Client +.idea/httpRequests + +local.properties \ No newline at end of file diff --git a/.idea/app.iml b/.idea/app.iml new file mode 100644 index 0000000..787b59b --- /dev/null +++ b/.idea/app.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/bld.iml b/.idea/bld.iml new file mode 100644 index 0000000..e63e11e --- /dev/null +++ b/.idea/bld.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml deleted file mode 100644 index 17101f8..0000000 --- a/.idea/checkstyle-idea.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/checkstyleidea-libs/readme.txt b/.idea/checkstyleidea-libs/readme.txt deleted file mode 100644 index 71cc7ff..0000000 --- a/.idea/checkstyleidea-libs/readme.txt +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index d91f848..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index a857b2a..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/copyright/BSD_3_Clause.xml b/.idea/copyright/BSD_3_Clause.xml new file mode 100644 index 0000000..956f692 --- /dev/null +++ b/.idea/copyright/BSD_3_Clause.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/Erik_s_Copyright_Notice.xml b/.idea/copyright/Erik_s_Copyright_Notice.xml deleted file mode 100644 index ef51a2d..0000000 --- a/.idea/copyright/Erik_s_Copyright_Notice.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index 1419e40..0000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 97626ba..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..7e0a3c7 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index dd4c951..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index b23fa44..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml deleted file mode 100644 index 5806fb3..0000000 --- a/.idea/kotlinc.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/libraries-with-intellij-classes.xml b/.idea/libraries-with-intellij-classes.xml deleted file mode 100644 index 9fa3156..0000000 --- a/.idea/libraries-with-intellij-classes.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml new file mode 100644 index 0000000..abca604 --- /dev/null +++ b/.idea/libraries/bld.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/compile.xml b/.idea/libraries/compile.xml new file mode 100644 index 0000000..9bd86aa --- /dev/null +++ b/.idea/libraries/compile.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/runtime.xml b/.idea/libraries/runtime.xml new file mode 100644 index 0000000..2ae5c4b --- /dev/null +++ b/.idea/libraries/runtime.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/test.xml b/.idea/libraries/test.xml new file mode 100644 index 0000000..b80486a --- /dev/null +++ b/.idea/libraries/test.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 90755e7..ea78ec7 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,118 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..55adcb9 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules/examples-kotlin_main.iml b/.idea/modules/examples-kotlin_main.iml deleted file mode 100644 index 4aeac9a..0000000 --- a/.idea/modules/examples-kotlin_main.iml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules/examples-kotlin_test.iml b/.idea/modules/examples-kotlin_test.iml deleted file mode 100644 index 4b23562..0000000 --- a/.idea/modules/examples-kotlin_test.iml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Run Tests.xml b/.idea/runConfigurations/Run Tests.xml new file mode 100644 index 0000000..4f6af10 --- /dev/null +++ b/.idea/runConfigurations/Run Tests.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/.idea/scopes/Copyright.xml b/.idea/scopes/Copyright.xml deleted file mode 100644 index 7fb840b..0000000 --- a/.idea/scopes/Copyright.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..35eb1dd 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ 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..c83239c --- /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/dist/bld-1.7.1.jar", + "lib/compile/*.jar", + "lib/runtime/*.jar", + "lib/test/*.jar" + ] +} diff --git a/README.md b/README.md index 84e3efc..d993dd6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,16 @@ # Semantic Version Annotation Processor -[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) [![release](https://img.shields.io/github/release/ethauvin/semver.svg)](https://github.com/ethauvin/semver/releases/latest) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver) +[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) +[![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) +[![bld](https://img.shields.io/badge/1.7.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) +[![release](https://img.shields.io/github/release/ethauvin/semver.svg)](https://github.com/ethauvin/semver/releases/latest) +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver) +![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/net.thauvin.erik.httpstatus/httpstatus?server=https%3A%2F%2Foss.sonatype.org) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_semver&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_semver) [![GitHub CI](https://github.com/ethauvin/semver/actions/workflows/gradle.yml/badge.svg)](https://github.com/ethauvin/semver/actions/workflows/gradle.yml) [![Build status](https://ci.appveyor.com/api/projects/status/nbv4mxd1gpxtx69o?svg=true)](https://ci.appveyor.com/project/ethauvin/semver) [![CircleCI](https://circleci.com/gh/ethauvin/semver/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/semver/tree/master) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_semver&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_semver) +[![GitHub CI](https://github.com/ethauvin/semver/actions/workflows/gradle.yml/badge.svg)](https://github.com/ethauvin/semver/actions/workflows/gradle.yml) +[![Build status](https://ci.appveyor.com/api/projects/status/nbv4mxd1gpxtx69o?svg=true)](https://ci.appveyor.com/project/ethauvin/semver) +[![CircleCI](https://circleci.com/gh/ethauvin/semver/tree/master.svg?style=shield)](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). diff --git a/appveyor.yml b/appveyor.yml index 0d75649..3eebf3d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,23 +8,20 @@ build: verbosity: detailed build_script: - - gradlew.bat assemble --info --no-daemon + - bld.bat download compile test_script: - - gradlew.bat check --info --no-daemon + - bld.bat test branches: only: - master - 1.2.1-dev -cache: - - C:\Users\appveyor\.gradle - environment: matrix: - JAVA_HOME: C:\Program Files\Java\jdk17 - - JAVA_HOME: C:\Program Files\Java\jdk19 + - JAVA_HOME: C:\Program Files\Java\jdk20 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 new file mode 100644 index 0000000..5ae1016 --- /dev/null +++ b/bin/main/META-INF/services/javax.annotation.processing.Processor @@ -0,0 +1,33 @@ +# +# 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 new file mode 100644 index 0000000000000000000000000000000000000000..b2993072af612ad38c72cef451680df8ee1988f8 GIT binary patch literal 1771 zcmai!`*Pbv6vodwNv*iKv!NV&$Cl>Q zzG1YH8$m{k8(gz_k=YiU-It28c}uf2$FvlB2TRDd5GU7VBIRvJnb$N`XAa^y9fj_) zER(GRt>w4}<1+VnlfyNyyJpML&E~`pqObM5C{=rdH1I?9BtIT}hlp;QTXtq$bb~@4 zFq%Ia`oVEuq|p4vE6s`$KSH8~wHn3ZSN|C*mN$)LRp?VjbA9h@5Wl#biL1~T*|HzL zv^eUOD;HvCXDhy5cF zJKj+MomY$jcDKFQ&v^22Ha+zdMz@Ury{d4_RP4bp?uuPMbGMXVIfK&<%-ig5P|B-;(xkV*PE2 zZ-L*H_&xBp#CO2=Bz_;PN?Zj$koZIJ#}a=6{!HS}!Cy-J5d28u$KbCe*1$E1>)>69 z_rSWu`(Q)j29zpg9f<#LaUwf7C0tCjboV(~f0EN#X+Ni@e~-@U2RtjVCi;zL>38}O TZwq5<`iXu9F>>)N(J%i2PDOQJ literal 0 HcmV?d00001 diff --git a/bin/main/net/thauvin/erik/semver/Version.class b/bin/main/net/thauvin/erik/semver/Version.class new file mode 100644 index 0000000000000000000000000000000000000000..239b8a216bbbdd2ff65989948fd56e55d92ae657 GIT binary patch literal 1302 zcmaizYflqF6o${xmKG>dZVDoTsFjLzyhNI??gr(rp?)9x*^vyJ_0e((qQ zqm1t^y-Wy+ADW$c&il@}%=FLSU%!dyExj(%n4q8ikCtvXK3ewVd#%sN(K zP^7$|N?UfNtR>O*Rm2Tpr)`*hlsw^aoM?==;HL74xASeg$0l z68<4YDq%N)T`s0cfGHc40j6zm1z^So6@XbA%mK{XU;$u}t`4&7(KUc2Td@eRY%8t< ztk{ZWfEzYQD_y;4xoIm_p;)s)YFW3zEr1Oh+y=N~gS!A#8>DC4vq2SL(*~)cW`p|x uTQ;ZxJg~twK-~rojnPBg$QV7M$M~*b^#t>K%Jht$(~ETZg9Ot{di4*(IUSz> literal 0 HcmV?d00001 diff --git a/bin/main/net/thauvin/erik/semver/VersionInfo.class b/bin/main/net/thauvin/erik/semver/VersionInfo.class new file mode 100644 index 0000000000000000000000000000000000000000..8351bcffd22f36dddae0af8ec78fffc5b46a908f GIT binary patch literal 4393 zcma)9TXP)675+xImDgiz)&|EIYy(8JQ}b?RdQ63mh1}@s+EQ3|y_rD^n^zW`sjG|b z(^M%}oFF*uR28YJ&LzK2s-j@m6TGqJl;@lo6|bl{p=_3|)z!GFC?}xWmet8JYo=EB zBl9){s^-+4P`KLebv-vcY@xZcYtll?h(E2eXvSA;Y{N}i+=5#(*ty2b(q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eN*LNfO-B1@Z6(*Xb-1Ko z3fD_!uAa1Aw~|X*6u7UBY9e0JbA{_=vyX)|*8y_fu@0B?ZQ**wY}dgwS1-8=>u^c$ z7p_;$cJ-yX`pI=@9WMEP5U%f=x%$&wN62+_9WMC>5w0JYxdzf)MRG;WzcKdm9V1*n zG;<|da&#uf$yHj%F8LOcFRmXk%T4$(e!_7Z=f9-%SBdAZ@h0EMA4k8z@9;Ku{12CW B25tZV literal 0 HcmV?d00001 diff --git a/bin/main/net/thauvin/erik/semver/VersionProcessor.class b/bin/main/net/thauvin/erik/semver/VersionProcessor.class new file mode 100644 index 0000000000000000000000000000000000000000..38b56762ba015bd17d9e380a9de42f16f3291a53 GIT binary patch literal 13084 zcmbVS34B!5)j#KEk~cHC2{5dKA_FQWA&{cfWugd1zz{+(L6AjdNM6X0$xNJiA>dN? zR=>KmwVT*#H%(iuRoey_gSQvDw4KS<8;J&cE*!6b~@f!ld-#Y+Uc70b~+PJCD*1?t#&4p zN?YV(TCgLwGq$THmQ1Fcn1k+`Znr<4++MS6TgFMpTAkbwrsDQ^!cH?CyZT52R|rro zlfMfy#kR|Uc}E=3=)qx3$?5TA+*!g@R8hH}$yb+Zvx8JbWtsvMWSX!#p0wBWbZxWK z>tfpyHdAPIsx_8aA4|vO+iUbW9q|lP)#`W34oqFT-FDX5UEPV81GFbsY#MKHZKYXN zO(F(vwK!=ot=3OdL8Qy`gQlKe9bHGRY;+|LnESOqRKxEUl9d@fzTe-a8JCH&gTohr-6(4T>pB}_ z-QJEC+v#))k~CyJ9@8t=2WT;!Y|*=!j&dc_Nu?5*nzQ4v?a5TeiMJlt5Kp#gI)zS! z6fbXXZfa(l1;tqCsQ)oOQ(xyV?wDobfRRa4)T>#=Ax%)~g-F8G4fKx;&~o0yJ!2Q;o1;XGGU zvoInEbJcC9ow%J5l~||gJOaoQ&U1v1OUD^mbQ~l2)_BVW7MK69DWWmAYWlFzm`;0lW^LMT zkMEM^k81i@R*}RtG}yaC*#D&T?a_3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yf zKEwJzv@EP8?kS66wUfd+Tqbc39uoKH12A6siBC2Y_t8hNs*PCgDYE226@|Jy#JvNm zwuquZj+TP7aBx5^gOM!*A!T_&%7l=zezj5vDGlS(Z$87N2Qa2o2+>indQ!MFtc4If zgpg7p#O2a}I)@Qmo#=(is@@Rw0HTPgJeO;*n{VOb#1bODgYV&eczy)u7muOc75l59 zpG1Fw^!ybL^lx+wVx|jmbE*x|;ts@4m*V?!+?BeXUd8>v*WhAbhh;m28**>Js=i4- z#5JfF>1}!qo~n$QC*nC37o6sD5zhO4I9x8qp>YY0I4!;&&s*3JN&=uIh;n@?%EV3#B7h_BDH%~RI7K8`4&`z~Zorh}S9cWvxHc**S;8$td zVdO-{(n=D9$P2$)EPmTUbSF6vX|J z3FE+;@NcPw@DDZ3A+g^fQio`&kX(L597;k(gJ97J1aCkBeCmA2gi;&TCOjt*tIhb^ zvYAvy&B*XPbpe`hr0J>^&28ql{eSxHFr#*u--P*1n%{2on>N3W`Q2%LcbVTy% + + + 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 new file mode 100644 index 0000000..0a58f86 --- /dev/null +++ b/bin/main/semver-kt.mustache @@ -0,0 +1,38 @@ +/* +* 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 new file mode 100644 index 0000000..cd7c567 --- /dev/null +++ b/bin/main/semver.mustache @@ -0,0 +1,34 @@ +/* +* 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 new file mode 100644 index 0000000000000000000000000000000000000000..c8c9fdee06825dd20f0e81d4e482e065ffcb7024 GIT binary patch literal 1583 zcma)6+fo}x5IrLVyND$Qaf_Xp_!=aGSmVUTSQr~~aWDcWpomzx)gVpKg0xb0XQ}vC z@&kF!OAJm`D$jY#PvkS=oLxyEOdecYHPdrDeY*Sf{`K$cKL9+$_Xc7DH(jM|U6H|| zjpSNnP8YXfnCfqi)>?W%P5?B~1ts-y*a<{j733j$rKbU`4# zR4=Opy3lK(8$ALSa*nGugW9h0@^ZJT1d_RWNmdKebHa6NGp;L+FEEjNCo)+9OOw>H z`auR&&4(Aa0#`dVRd9TVsEe*!*HSx-K;Uw&?(Ny(ee#y4Cw3TD)b zQpLo$fXJA*B9Lf!YD-m>^qH<CJKRR-5OmhS z(=$46mej-=^LIiifmN(q$YFz&lw0<999?-U+O`&oVR@fh_#9ub>P`9Ny?~7{nkt?z zZMqOfux%laF9nQ>^fx22Y_B3I=yu6SvLpO3@yuOJH^TlpCrJ7_+jK7*?Z&(D7Rvnj z*9%1M-)7YhHe{pKuZit?;FZ*>6Ls{NKgD$D9#=sP@Gk?7)IWMS8eG|&1?TQtuVDU4 zBZdUW@EEv*K8{xN0_T3NC@`MJaG`Z;fO81sN5H^LJf0jp!cbRN@?vxPfK&1^zmJY^ zHF<;I$DxtpcZk3H$PNj6sUy5}x2Xl{||Tu9oo(Pa~>VqJ*!vsG3+p0Xxj!EK$C~3sNi+C(Lg1 f>}y)zaAz2?H|+Dc0b#J$41!{aXW#NHhVT9ZXs&N& literal 0 HcmV?d00001 diff --git a/bin/test/net/thauvin/erik/semver/VersionInfoTest.class b/bin/test/net/thauvin/erik/semver/VersionInfoTest.class new file mode 100644 index 0000000000000000000000000000000000000000..8c5f8b425d3329db982cadd38abb544806ef3bfe GIT binary patch literal 5276 zcma)A33yyZ9sf$xUn*D;Ic>L>Afi=76ctfW3mR+m|+=tE41`@gd0&O1PH@s?QihbwsA>v#7e+!r20_aE`z@ZCfCFE@QH*S)oNP z#Zt|v2} zR&`pqm^05{j&foqE>T@}slXJcvvc=03YzA_5+8~51!aGEs7bAyHtoxm5+5^MVU>S8 z;LV)W$$M41G=g|A#t5@emqSoSG9%f1sX;{juz3I+$ixWB_qiYE76;S9*Phr zsKQ&ge_w7WWZWntFaz;xV<`B;{)~Wz2R@1T$n;f|KHYo6LSGqtHT$ z#|#yXaz7%gOl+0dW>OhzpB;=PH2*~OtzWXgP%eX(MFO5On(6EJX8F%&CDJ!DpZwn-1YQH1#T{8!kW_Vhe zg8H7s_l<`U!NQ9{eMg8B)Af?XkMQH5b(iIHeH=h+-4hddg%Qx_>#(2Bv>fO9EZLV) zr#@bl_?ePP(Ee3C)vI|$;=jt*E&PI8^{Pp(1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92S;o#5IRIb4xw_d_k!whKO^`6r{qQ^ z^+6nohxn(8huO7{VjW*CL;TL;38rxqZeVBM#P3^}&IkF#cnsU|EOzjYzMYBP!Ta?# zyn-k3mU=<(l`sj<=mbsm_&P0U@Tn9Kbuc-o}+&3VuC3vsxZ&s8md9Vw0y H3o-3~xTS0A literal 0 HcmV?d00001 diff --git a/bin/test/net/thauvin/erik/semver/VersionProcessorTest.class b/bin/test/net/thauvin/erik/semver/VersionProcessorTest.class new file mode 100644 index 0000000000000000000000000000000000000000..5166fb7ce0118d1cc550c6ad4c7f9900aa28fa20 GIT binary patch literal 2718 zcma)8YgZFj6y29ZW{88zsQ9WCYi$#PM37bmMNvV6;i1sjU~M~uOBe|=I5VMY-|y!y zX!|GHRnb*fyV|e)6a7~IMOXJt1~WXmaIseA-gC}9XPasw~+~Mtb&q#+M6A(#zzf=i9C`?zu(j`>r=B{Xj!pV8?B1$;y;1r<56+zAcM^ zK-1!il|Xy$Sv~d%XpE$y2prz*7_A%6*p40a3&fJCyg>Y-J0lZ_q1iwa5*oG(B%d{S z0^88s1Od~)7Bp(uC2(Yu!-|3gcGk}AF`z*g*q*Z;Ia*nmmfoZ_U6%BibBk6vZ+W)b zhr)O;XZr%3o29vmZ|1x$V9+7knaNw_ilm3c;N7BJ3`m-<;gGnSt3m3XVUUYGKd^FBG6VpkS&*G$tn*NRUbUH64-aW;so}B z%-g=rJO>=d4XXYK@?g&ON*M*6U1HTW8AV~As@cm1l1K^Y41KX|`8>2Unab6}R)u{! z(oA{wY5p3Hk@7WG8ZzWzlj0@Nfi45xI3du&pqFH^Y8?`A|) z!xKfg!eq?@vw8(5HM}aYw~lYMje%1*Ezs=Cphl-6j*Xn0O6Aq@J_BcPmW^(+IP=t; zj)JO9+bU3@D2gf+X*joeLuZ{?H-UZ(7`T9oB$~X0b1$%KRXIXNbPQ5+{MhkhCwrIN znRzRnUa-7?bE)Gpi%@rv+`uT6Ko(au46_801{v^u=>-OI7!feo3)~IfsaRz;#VQ6u z5Rt0ZOj%sMLiBGbO7;U+cJ2C4*hITOll=_fFSW*u(| zh%U8$+kk~>24^>|oEA70?U?^(Cz4IrFgj-Fxm(99@7M0mE**2+pU`oe4SHXCu8uMV zJvw+>$J%<@bS&~QSX_tSTlGZLAT%Msl7AFt`DF#Sl_^^%asR9?rY z0=w6_CtWEWpA*$Om12&%FE=_y64_#cG`7~lucis=C=* zbrI)pH{v*f?dZXNuJ=)5&>3BDe}G?s=jc9$gIw$UK94rMfET%Ir0yucD)0~7DS+Ab zU(m9Qm(2F~Z|Eq*%+85r9M7fW%jiif9mTOijH^~EdjCNGNXIhHo0rU?N4Ub}sCmtt z;Ia;Le>LCJXhkmp^%3M*{`KPu&Q;;I)dGibTbayj$P-#O_TUCyCuahM%~KGCFoh?N zF-5N4$feC&=B;JCbt7#SO<7x%OuM$2Hy6}mC0)0%mhRL-n#7I+~zMxT^;9mZ( z1YBZu2hoBd5_uU%NN)#*DY?o!eHbGgt?L-&ERW$wUb=s>)&8MG^-HY)Pr?G|_#0p0 TYmz>K@2jOy1^9+`4fysyUe(o; literal 0 HcmV?d00001 diff --git a/bin/test/net/thauvin/erik/semver/VersionTest.class b/bin/test/net/thauvin/erik/semver/VersionTest.class new file mode 100644 index 0000000000000000000000000000000000000000..0047ff2e10bbbcca280af20cac1aa963856e6a30 GIT binary patch literal 2517 zcmai!OH&g;5XXB0fdwLO-w#kkUXlexQQn9TknoTo<;BA!4q+j?8+Rv^DKB2Uc=6)J zix)2*Jm|?P4}JhYlx5E(Y~t8e95%bt-M@eLbkF4XpP#<~U>2S>LX1J5C!{U+c=6Ej zY!NsIb|~CK5!gE-2p!+s7NKl}dIs(L{E*vu?&a)_%)ZE?wShs;F*t*U8OL+v9D};S zp&bVGOa2Sd40X_wfJU$ww51$RtQXyk2)219FBo*D{4CG!@W4^)im_hqIU$4o)G-NF zz0(X@x##(kOSOYi0Y$q8hf>uYEaiC^Vpvn!$$4BB1B{sbKVoL2hN&vri;?*BoKndY zo&1Y6AvuHYe^k;kaJ<~K1*dWUV`GyH5>f1`C|Ph0JK}1vEpluIV%K?P!9@ma1lwUa zG}p_ZMRCc34#pa?YD??f6&Cbi*Vjs_6AYRUL@7K{yoL^~mShlj`Mw|Mv8*t#^h!$) zD4*jgpQYd0iiNZkc=mwjL^;VAjxOuF$z9)1idWn%sL{m>TxRzW)Nc)rV+~m3mdFbp zVsW=|#~Hoj6IHX0yjzY8%8_{Ds{W%5%wS7KahRq@^YaWk&{5%|&NLPRU!7MA?qSJm zrC!yT-p#U6r_^pOu~1$YL?9gzTJQ)7iQy>bSB%)|P!xE;r5{-E7z@H?CL)uTS;h`X zfi2+@cf5f!bW3=r)O||2#ZdC>9yY69;>omNi$Ux_O)BjdgRFSys7AKeT)(6`x6lhX zD}3U3dC%d4mj_o(_+{gp;X6M31De0%M+_49+n|l3a00&*q`=yAkbSTdPt&^1bW9r zUz6w*fliy~8xox*&^Z%*OQH(|x@e;BNOXxn@0;j*5`93R4^8v~i7pf9iiv(C(NzLX dndm1HT_ezS6a7r0n*{pAM8A+|TK^$z{{@|4QCt83 literal 0 HcmV?d00001 diff --git a/bld b/bld new file mode 100755 index 0000000..824b742 --- /dev/null +++ b/bld @@ -0,0 +1,2 @@ +#!/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 new file mode 100644 index 0000000..ab43bcd --- /dev/null +++ b/bld.bat @@ -0,0 +1,4 @@ +@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 deleted file mode 100644 index 478fc4b..0000000 --- a/build.gradle +++ /dev/null @@ -1,221 +0,0 @@ -// import com.github.spotbugs.snom.SpotBugsTask -import org.apache.tools.ant.taskdefs.condition.Os - -plugins { - id 'java' - id 'jacoco' - id 'maven-publish' - id 'pmd' - id 'signing' - id 'com.github.ben-manes.versions' version '0.47.0' - id 'net.thauvin.erik.gradle.semver' version '1.0.4' - // id 'com.github.spotbugs' version '5.0.14' - id 'org.sonarqube' version '4.2.1.3168' -} - -defaultTasks 'check' - -group = 'net.thauvin.erik' - -final def mavenName = 'SemVer' -final def mavenDescription = 'Semantic Version Annotation Processor' -final def mavenUrl = 'https://github.com/ethauvin/semver' -final def mavenLicense = 'The BSD 3-Clause License' -final def mavenLicenseUrl = 'http://opensource.org/licenses/BSD-3-Clause' -final def mavenScmCon = 'https://github.com/ethauvin/semver.git' -final def mavenScmDevCon = 'git@github.com:ethauvin/semver.git' - -def isNonStable = { String version -> - def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) } - def regex = /^[0-9,.v-]+(-r)?$/ - return !stableKeyword && !(version ==~ regex) -} - -ext.versions = [ - pmd: '6.54.0', - // spotbugs: '4.7.3' -] - -repositories { - mavenLocal() - mavenCentral() - maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } -} - -dependencies { - implementation 'com.github.spullara.mustache.java:compiler:0.9.10' - - // spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0' - // spotbugsPlugins 'com.mebigfatguy.sb-contrib:sb-contrib:7.6.0' - - // compileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs" - // testCompileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs" - - testImplementation 'org.testng:testng:7.8.0' -} - - -tasks.withType(JavaCompile) { - options.encoding = 'UTF-8' -} - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - withSourcesJar() - withJavadocJar() -} - -tasks.named("dependencyUpdates").configure { - rejectVersionIf { - isNonStable(it.candidate.version) - } -} - -pmd { - toolVersion = versions.pmd - ignoreFailures = true - ruleSets = [] - ruleSetFiles = files("${projectDir}/config/pmd.xml") - consoleOutput = true -} - -publishing { - publications { - mavenJava(MavenPublication) { - from components.java - groupId = project.group - artifactId = rootProject.name - - pom { - name = mavenName - description = mavenDescription - url = mavenUrl - licenses { - license { - name = mavenLicense - url = mavenLicenseUrl - } - } - developers { - developer { - id = 'ethauvin' - name = 'Erik C. Thauvin' - email = 'erik@thauvin.net' - url = 'https://erik.thauvin.net/' - } - } - scm { - connection = 'scm:git:' + mavenScmCon - developerConnection = 'scm:git:' + mavenScmDevCon - url = mavenUrl - } - } - } - } - repositories { - maven { - name = 'ossrh' - project.afterEvaluate { - url = project.version.contains('SNAPSHOT') - ? 'https://oss.sonatype.org/content/repositories/snapshots/' - : 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' - } - credentials(PasswordCredentials) - } - } -} - -signing { - useGpgCmd() - sign publishing.publications.mavenJava -} - -javadoc { - doFirst { - title = "$mavenDescription $project.version API" - } - options.with { - source = '17' - tags = ['created'] - author = true - //addBooleanOption('html4', true) - links('https://docs.oracle.com/en/java/javase/17/docs/api/') - //addStringOption('Xdoclint:none', '-quiet') - } -} - -test { - testLogging { - exceptionFormat = 'full' - events('passed', 'skipped', 'failed') - } - - useTestNG() - - finalizedBy jacocoTestReport -} - -// spotbugs { -// toolVersion.set("${versions.spotbugs}") -// excludeFilter.set(file("$projectDir/config/spotbugs/excludeFilter.xml")) -// } - -// tasks.withType(SpotBugsTask).configureEach { -// reports { -// xml.required = false -// html.required = true -// } -// } - -tasks.register('release') { - group = 'Publishing' - description = 'Releases new version to local maven repository.' - dependsOn(wrapper, clean, publishToMavenLocal) - doFirst { - println "Version: $version" - } -} - -tasks.register('pandoc', Exec) { - group = 'Documentation' - def pandoc_args = ['--from', 'gfm', - '--to', 'html5', - '--metadata', "pagetitle=$mavenDescription", - '-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() - } -} - -jacocoTestReport { - dependsOn test - reports { - xml.required = true - html.required = true - } -} - - -sonarqube { - properties { - property('sonar.organization', 'ethauvin-github') - property('sonar.projectKey', 'ethauvin_semver') - property('sonar.host.url', 'https://sonarcloud.io') - property('sonar.sourceEncoding', 'UTF-8') - } -} - -tasks.sonar { - dependsOn 'jacocoTestReport' -} diff --git a/config/pmd.xml b/config/pmd.xml index e23c3fa..add20da 100644 --- a/config/pmd.xml +++ b/config/pmd.xml @@ -25,7 +25,6 @@ - diff --git a/docs/README.html b/docs/README.html index 2eab8e6..8758e21 100644 --- a/docs/README.html +++ b/docs/README.html @@ -5,83 +5,135 @@ Semantic Version Annotation Processor - - - + + -

Semantic Version Annotation Processor

-

License (3-Clause BSD) release Maven Central
-Known Vulnerabilities Quality Gate Status Build Status Build status CircleCI

-

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.

-

This processor was inspired by Cédric Beust's version-processor and works well in conjunction with the Semantic Version Plugin for Gradle.

+

Semantic Version +Annotation Processor

+

Java

+

+

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.

+

This processor was inspired by Cédric Beust's version-processor +and works well in conjunction with the Semantic +Version Plugin for Gradle.

Table of Contents

  • Examples
  • @@ -95,7 +147,8 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
  • Gradle
  • Kotlin
      @@ -107,34 +160,50 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
      • Using annotation elements:
      - +
      import net.thauvin.erik.semver.Version;
      +
      +@Version(major = 1, minor = 0, patch = 0, preRelease = "beta")
      +public class A {
      +// ...
      - - -

      View Examples

      +
      import net.thauvin.erik.semver.Version;
      +
      +@Version(properties = "version.properties")
      +public class A {
      +// ...
      +
      # version.properties
      +version.major=1
      +version.minor=0
      +version.patch=0
      +version.prerelease=beta
      +

      View +Examples

      Template

      -

      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")
      +public class A {
      +// ...

      Default Template

      -

      The default template implements the following static variables:

      +

      The default +template implements the following static variables:

      @@ -152,7 +221,8 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni - + @@ -203,17 +273,19 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
      BUILDDATE The build date.java.util.Datejava.util.Date
      VERSION

      Custom Template

      A very simple custom template might look something like:

      - -

      The mustache variables automatically filled in by the processor are:

      +
      /* version.mustache */
      +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}}";
      +}
      +

      The mustache variables automatically filled in by the processor +are:

      @@ -284,13 +356,17 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni - +
      String
      {{semver}} or {{version}}{{semver}} or +{{version}} The full semantic version. String
      -

      Please also look at this example using java.time

      +

      Please also look at this example +using java.time

      Elements & Properties

      The following annotation elements and properties are available:

      @@ -335,7 +411,8 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni - + @@ -384,7 +461,8 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni - + @@ -395,89 +473,150 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
      preReleasePrefixversion.prerelease.prefixversion.prerelease.prefix The pre-release prefix. -
      type Either java or kt for Kotlin.Either java or +kt for Kotlin. java
      -

      In order to easily incorporate with existing projects, the property keys may be assigned custom values:

      - - +

      In order to easily incorporate with existing projects, the property +keys may be assigned custom values:

      +
      @Version(
      +  properties = "example.properties",
      +  keysPrefix = "example."
      +  majorKey = "maj",
      +  minorKey = "min",
      +  patchKey = "build",
      +  preReleaseKey = "rel",
      +  buildMetaKey = "meta",
      +  projectKey = "project"
      +)
      +public class Example {
      +// ...
      +
      # example.properties
      +example.project=Example
      +example.maj=1
      +example.min=0
      +example.build=0
      +example.rel=beta
      +example.meta=
      +# ...
      -

      ⚠️ 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 pom.xml in the examples/java directory for a sample:

      - +

      To install and run from Maven, configure an artifact as +follows:

      +
      <dependency>
      +    <groupId>net.thauvin.erik</groupId>
      +    <artifactId>semver</artifactId>
      +    <version>1.2.0</version>
      +</dependency>
      +

      Please look at pom.xml +in the examples/java +directory for a sample:

      +
      mvn verify

      Gradle

      Class Generation

      -

      To install and run from Gradle, add the following to build.gradle:

      -
      dependencies {
      -    annotationProcessor 'net.thauvin.erik:semver:1.2.0'
      -    compileOnly 'net.thauvin.erik:semver:1.2.0'
      -}
      -
      -tasks.withType(JavaCompile) {
      -    options.compilerArgs += [ "-Asemver.project.dir=$projectDir" ]
      -}
      -
      -

      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.

      -

      Please look at build.gradle in the examples/java directory for a sample.

      +

      To install and run from Gradle, add +the following to build.gradle:

      +
      repositories {
      +    mavenCentral()
      +}
      +
      +dependencies {
      +    annotationProcessor 'net.thauvin.erik:semver:1.2.0'
      +    compileOnly 'net.thauvin.erik:semver:1.2.0'
      +}
      +
      +tasks.withType(JavaCompile) {
      +    options.compilerArgs += [ "-Asemver.project.dir=$projectDir" ]
      +}
      +

      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.

      +

      Please look at build.gradle +in the examples/java +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:

      -
      tasks.withType(JavaCompile) {
      -    options.annotationProcessorGeneratedSourcesDirectory = file("${projectDir}/src/generated/java")
      -}
      -
      -

      The GeneratedVersion.java file will now be located in src/generated.

      +

      In order to also incorporate the generated source code into the +source tree, add the following to build.gradle:

      +
      tasks.withType(JavaCompile) {
      +    options.generatedSourceOutputDirectory.set(file("${projectDir}/src/generated/java"))
      +}
      +

      The GeneratedVersion.java +file will now be located in src/generated.

      Kotlin

      -

      The annotation processor also supports Kotlin.

      -

      To generate a Kotlin version file, simply specify the type as follows:

      - -

      The Kotlin default template implements the same static fields and functions as the Java template.

      -

      Please look at the examples/kotlin project for a build.gradle.kts sample.

      +

      The annotation processor also supports Kotlin.

      +

      To generate a Kotlin version file, simply specify the +type as follows:

      +
      import net.thauvin.erik.semver.Version
      +
      +@Version(properties = "version.properties", type="kt")
      +open class Main {
      +// ...
      +

      The Kotlin +default template implements the same static fields and functions as +the Java template.

      +

      Please look at the examples/kotlin +project for a build.gradle.kts +sample.

      Kotlin & Gradle

      -

      To install and run from Gradle, add the following to build.gradle.kts:

      - -

      The directory containing the configuration files (version.properties, version.mustache) must be specified using the semver.project.dir processor argument.

      +

      To install and run from Gradle, add +the following to build.gradle.kts:

      +
      var semverProcessor = "net.thauvin.erik:semver:1.2.0"
      +
      +dependencies {
      +    kapt(semverProcessor)
      +    compileOnly(semverProcessor)
      +}
      +
      +kapt {
      +    arguments {
      +        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.

      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.

      -

      There are also full examples in both Java and Kotlin showing how to use both the plugin and annotation processor concurrently.

      +

      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/gradle.properties b/gradle.properties deleted file mode 100644 index e69de29..0000000 diff --git a/gradlew b/gradlew deleted file mode 100755 index fcb6fca..0000000 --- a/gradlew +++ /dev/null @@ -1,248 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index 93e3f59..0000000 --- a/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..e96bdc73bd304a7f6911304c8b5fefcb75913bf8 GIT binary patch literal 27266 zcmaI7V{9&5u*X}sySA}wJ+*BkE#yx|1oqB2oPB@6(Kq)IdKMAAvq~=F=Z8cS@G{l5RgaN z=_wf?9sL3Vkd9_{dahZCahYZR_(67hddYQG3P9hcLb7Rp>fNtpZEJg7R;&8vyX$cpsoAwUj8c6G1GNLh zvQY08-K!*k*7?fwqFi95w9}<%U_~2U3=;}brm}i=ks19RZ_9cktp-a0qIpE3LCQ|E zn~2c=%CcENr}=}<7u={pl~jQ=)&&`B`#|45T4EVQaaJ`b+EG8L3FJganpb&X%0Z*c z5*i7D#n&nA2H7qtvoW^z*ak$KJ$@#O#~fyM%VtHhl}T`flJW@mS_j=K){XjwFFJx|5NM?} z0#JxwN%PQB7yEc;1Or0h-4&^6yFk?r=KPi9MY+1Hj(uW>geK+NYFteEYjDcJJXP0v zCS!$a6585K(fr0Qx{~GZqlUAzH1_Bi`l9SjhPB+Y0F4q z@yUq%$nk0!T(I4Dm!^?WX}`FUSyTf0VM(f7Qs3_6?ypa1Tjngoy;fw$jg(W(BLU(_ z`&+FRj-tU6XNRVOBKpY&R~3ro_wpT?HsGRAPtu3P$~}}ZHHM^7J5%TK)w)~Ekei4V z+V3#3W0f2ad|Bd)LJSbK2r^)Sks2ZXae#|-DMb1N52D{&S!sqKu`(W+sc(!q^2-HZ zeNAPrx2>(#Th~@XLPQ&mb4=t%!$RAF;}(DtCDyR7>k=r{O}8n6Wj1apE>O@Tka4y_ z2=*7#)3MXan{kzJlM6fQDTKLWjd0fnsfs#4sc*dqsKFz5gLDH^8zt@)6glf)#M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dev/null +++ b/lib/bld/bld-wrapper.properties @@ -0,0 +1,9 @@ +bld.downloadExtensionJavadoc=false +bld.downloadExtensionSources=true +bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.2 +bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.0 +bld.extensions-testng=com.uwyn.rife2:bld-testng:0.9.1-SNAPSHOT +bld.repositories=MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES +bld.downloadLocation= +bld.sourceDirectories= +bld.version=1.7.1 diff --git a/pandoc.sh b/pandoc.sh new file mode 100755 index 0000000..2ac666d --- /dev/null +++ b/pandoc.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +pandoc --from gfm \ +--to html5 \ +--metadata "pagetitle=Semantic Version Annotation Processor" \ +-s \ +-c docs/github-pandoc.css \ +-o docs/README.html \ +README.md diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..8bb99f9 --- /dev/null +++ b/pom.xml @@ -0,0 +1,38 @@ + + + 4.0.0 + net.thauvin.erik.semver + semver + 1.2.1-SNAPSHOT + SemVer + Semantic Version Annotation Processor + https://github.com/ethauvin/semver + + + The BSD 3-Clause License + http://opensource.org/licenses/BSD-3-Clause + + + + + com.github.spullara.mustache.java + compiler + 0.9.10 + compile + + + + + ethauvin + Erik C. Thauvin + erik@thauvin.net + https://erik.thauvin.net/ + + + + scm:git:https://github.com/ethauvin/semver.git + scm:git:git@github.com:ethauvin/semver.git + https://github.com/ethauvin/semver + + diff --git a/preflightcheck.sh b/preflightcheck.sh deleted file mode 100755 index 76c698d..0000000 --- a/preflightcheck.sh +++ /dev/null @@ -1,201 +0,0 @@ -#!/bin/bash - -# set source and test locations -src="src/main/java/net/thauvin/erik/semver" -test="src/test/java/net/thauvin/erik/semver" -# e.g: .java, .kt, etc. -ext=".java" -java8=true -# e.g: -declare -a examples=( - "examples/java run runExample" - "examples/kotlin run runJava runExample runJavaExample") -# e.g: empty or javadoc, etc. -gradle_doc="javadoc pandoc" -# e.g. empty or sonarqube -gradle_sonar="sonar" -# gradle options for examples -gradle_opts="--console=plain --no-build-cache --no-daemon" -# maven arguments for examples -maven_args="compile exec:java" - -# -# Version: 1.1.5 -# - -if [ "$java8" = true ]; then - export JAVA_HOME="$JAVA8_HOME" - export PATH="$(cygpath "$JAVA_HOME")/bin:$PATH" -fi - -pwd=$PWD -red=$(tput setaf 1) -cyan=$(tput setaf 6) -std=$(tput sgr0) -date=$(date +%Y) - -pause() { - read -p "Press [Enter] key to continue..." -} - -checkCopyright() { - if [ "$(grep -c "$date" "$1")" == "0" ]; then - echo -e " Invalid: ${red}$f${std}" - else - echo -e " Checked: $1" - fi -} - -runGradle() { - cd "$1" || exit 1 - clear - reset - echo -e "> Project: ${cyan}${1}${std} [Gradle]" - shift - ./gradlew $@ || exit 1 - pause - cd "$pwd" -} - -runKobalt() { - cd "$1" || exit 1 - if [ -f kobalt/src/Build.kt ]; then - clear - reset - echo -e "> Project: ${cyan}${1}${std} [Kobalt]" - shift - ./kobaltw $@ || exit 1 - pause - fi - cd "$pwd" -} - -runMaven() { - cd "$1" || exit 1 - if [ -f pom.xml ]; then - clear - reset - echo -e "> Project: ${cyan}${1}${std} [Maven]" - shift - mvn $@ || exit 1 - pause - fi - cd "$pwd" -} - -updateWrappers() { - clear - ./updatewrappers.sh - pause -} - -checkDeps() { - clear - echo -e "${cyan}Checking depencencies...${std}" - gradle --console=plain dU || exit 1 - read -p "Check Examples depencencies? [y/n] " cont - clear - case $cont in - [Nn]) return ;; - *) for ex in "${!examples[@]}"; do - runGradle $(echo "${examples[ex]}" | cut -d " " -f 1) dU - # runKobalt $(echo "${examples[ex]}" | cut -d " " -f 1) checkVersions - runMaven $(echo "${examples[ex]}" | cut -d " " -f 1) versions:display-dependency-updates - if [ "$ex" -eq "${#examples}" ]; then - read -p "Continue? [y/n]: " cont - clear - case $cont in - *) continue ;; - [Nn]) return ;; - esac - fi - done ;; - esac -} - -gradleCheck() { - clear - echo -e "${cyan}Checking Gradle build....${std}" - gradle $gradle_opts clean check $gradle_doc $gradle_sonar || exit 1 - pause -} - -runExamples() { - for ex in "${!examples[@]}"; do - runGradle ${examples[ex]} clean $gradle_opts - # runKobalt ${examples[ex]} clean - runMaven $(echo "${examples[ex]}" | cut -d " " -f 1) clean $maven_args - done -} - -examplesMenu() { - clear - echo -e "${cyan}Examples${std}" - for ex in "${!examples[@]}"; do - printf ' %d. %s\n' $(($ex + 1)) $(echo "${examples[ex]}" | cut -d " " -f 1) - done - echo " $((${#examples[@]} + 1)). Run All Examples" - read -p "Enter choice [1-${#examples[@]}]: " choice - clear - case $choice in - [0-9]) if [ "$choice" -gt "${#examples[@]}" ]; then - runExamples - examplesMenu - else - runGradle ${examples[$(($choice - 1))]} - # runKobalt ${examples[$(($choice - 1))]} - runMaven $(echo "${examples[$(($choice - 1))]}" | cut -d " " -f 1) $maven_args - examplesMenu - fi ;; - *) return ;; - esac -} - -validateCopyrights() { - clear - echo -e "${cyan}Validating copyrights...${std}" - for f in "LICENSE.txt" ${src}/*${ext} ${test}/*${ext}; do - if [ -f "$f" ]; then - checkCopyright "$f" - fi - done - pause -} - -everything() { - updateWrappers - checkDeps - gradleCheck - runExamples - validateCopyrights -} - -showMenu() { - clear - echo "${cyan}Preflight Check${std}" - echo " 1. Update Wrappers" - echo " 2. Check Dependencies" - echo " 3. Check Gradle Build" - echo " 4. Run Examples" - echo " 5. Validate Copyrights" - echo " 6. Check Everything" -} - -readOptions() { - local choice - read -p "Enter choice [1-6]: " choice - case $choice in - 1) updateWrappers ;; - 2) checkDeps ;; - 3) gradleCheck ;; - 4) examplesMenu ;; - 5) validateCopyrights ;; - 6) everything ;; - *) exit 0 ;; - esac -} - -while true; do - showMenu - readOptions -done diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 0b39698..0000000 --- a/settings.gradle +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This settings file was auto generated by the Gradle buildInit task - * by 'erik' at '1/13/16 1:03 PM' with Gradle 2.10 - * - * The settings file is used to specify which projects to include in your build. - * In a single project build this file can be empty or even removed. - * - * Detailed information about configuring a multi-project build in Gradle can be found - * in the user guide at https://docs.gradle.org/2.10/userguide/multi_project_builds.html - */ - -/* -// To declare projects as part of a multi-project build use the 'include' method -include 'shared' -include 'api' -include 'services:webservice' -*/ -rootProject.name = 'semver' - diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..3c63dd8 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,7 @@ +sonar.organization=ethauvin-github +sonar.projectKey=ethauvin_semver +sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml +sonar.sources=src/main/java/ +sonar.tests=src/test/java/ +sonar.java.binaries=build/main,build/test +sonar.java.libraries=lib/compile/*.jar diff --git a/src/bld/java/net/thauvin/erik/semver/SemverBuild.java b/src/bld/java/net/thauvin/erik/semver/SemverBuild.java new file mode 100644 index 0000000..8c5de48 --- /dev/null +++ b/src/bld/java/net/thauvin/erik/semver/SemverBuild.java @@ -0,0 +1,147 @@ +/* + * SemverBuild.java + * + * 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. + */ + +package net.thauvin.erik.semver; + +import rife.bld.BuildCommand; +import rife.bld.Project; +import rife.bld.extension.JacocoReportOperation; +import rife.bld.extension.PmdOperation; +import rife.bld.extension.TestNgOperation; +import rife.bld.publish.*; +import rife.tools.exceptions.FileUtilsErrorException; + +import java.io.IOException; +import java.nio.file.Path; +import java.util.List; + +import static rife.bld.dependencies.Repository.*; +import static rife.bld.dependencies.Scope.compile; +import static rife.bld.dependencies.Scope.test; +import static rife.bld.operations.JavadocOptions.DocLinkOption.NO_MISSING; + +public class SemverBuild extends Project { + public SemverBuild() { + pkg = "net.thauvin.erik.semver"; + name = "SemVer"; + version = version(1, 2, 1, "SNAPSHOT"); + + var description = "Semantic Version Annotation Processor"; + var url = "https://github.com/ethauvin/semver"; + + javaRelease = 17; + + downloadSources = true; + repositories = List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS); + + scope(compile) + .include(dependency("com.github.spullara.mustache.java", "compiler", + version(0, 9, 10))); + scope(test) + .include(dependency("org.testng", "testng", version(7, 8, 0))); + + javadocOperation().javadocOptions() + .tag("created.on", "a", "Created on:") + .windowTitle(name + ' ' + version.toString() + " API") + .docLint(NO_MISSING); + + publishOperation() + .repository(version.isSnapshot() ? repository(SONATYPE_SNAPSHOTS_LEGACY.location()) + .withCredentials(property("sonatype.user"), property("sonatype.password")) + : repository(SONATYPE_RELEASES.location()) + .withCredentials(property("sonatype.user"), property("sonatype.password"))) + .repository(MAVEN_LOCAL) + .info(new PublishInfo() + .groupId(pkg) + .artifactId(name.toLowerCase()) + .name(name).version(version) + .description(description) + .url(url) + .developer(new PublishDeveloper() + .id("ethauvin") + .name("Erik C. Thauvin") + .email("erik@thauvin.net") + .url("https://erik.thauvin.net/")) + .license(new PublishLicense() + .name("The BSD 3-Clause License") + .url("http://opensource.org/licenses/BSD-3-Clause")) + .scm(new PublishScm() + .connection("scm:git:" + url + ".git") + .developerConnection("scm:git:git@github.com:ethauvin/" + name.toLowerCase() + ".git") + .url(url)) + .signKey(property("sign.key")) + .signPassphrase(property("sign.passphrase"))); + } + + public static void main(String[] args) { + new SemverBuild().start(args); + } + + @BuildCommand(summary = "Generates JaCoCo Reports") + public void jacoco() throws IOException { + new JacocoReportOperation().fromProject(this).execute(); + } + + @BuildCommand(summary = "Runs PMD analysis") + public void pmd() { + new PmdOperation() + .fromProject(this) + .failOnViolation(true) + .ruleSets("config/pmd.xml") + .execute(); + } + + private void rootPom() throws FileUtilsErrorException { + PomBuilder.generateInto(publishOperation().info(), publishOperation().dependencies(), + Path.of(workDirectory.getPath(), "pom.xml").toFile()); + } + + @BuildCommand(summary = "Run tests with TestNG") + public void test() throws Exception { + new TestNgOperation() + .fromProject(this) + .packages("net.thauvin.erik.semver") + .execute(); + } + + @Override + public void publish() throws Exception { + super.publish(); + rootPom(); + } + + @Override + public void publishLocal() throws Exception { + super.publishLocal(); + rootPom(); + } +} diff --git a/src/main/java/net/thauvin/erik/semver/Constants.java b/src/main/java/net/thauvin/erik/semver/Constants.java index 27c0733..8dbc3d5 100644 --- a/src/main/java/net/thauvin/erik/semver/Constants.java +++ b/src/main/java/net/thauvin/erik/semver/Constants.java @@ -36,9 +36,10 @@ package net.thauvin.erik.semver; * The Constants class holds the constant variables used throughout this project. * * @author Erik C. Thauvin - * @created 2016-01-13 + * @created.on 2016-01-13 * @since 1.0 */ +@SuppressWarnings("PMD.DataClass") public final class Constants { /** * The default metadata prefix. diff --git a/src/main/java/net/thauvin/erik/semver/Version.java b/src/main/java/net/thauvin/erik/semver/Version.java index 98b18db..9e73b07 100644 --- a/src/main/java/net/thauvin/erik/semver/Version.java +++ b/src/main/java/net/thauvin/erik/semver/Version.java @@ -41,7 +41,7 @@ import java.lang.annotation.Target; * The Version class implements the annotation interface. * * @author Erik C. Thauvin - * @created 2016-01-13 + * @created.on 2016-01-13 * @since 1.0 */ @SuppressWarnings("SameReturnValue") diff --git a/src/main/java/net/thauvin/erik/semver/VersionInfo.java b/src/main/java/net/thauvin/erik/semver/VersionInfo.java index 297dc08..3fb3437 100644 --- a/src/main/java/net/thauvin/erik/semver/VersionInfo.java +++ b/src/main/java/net/thauvin/erik/semver/VersionInfo.java @@ -36,7 +36,7 @@ package net.thauvin.erik.semver; * The VersionInfo class is used to hold and retrieve the semantic version values. * * @author Erik C. Thauvin - * @created 2016-01-16 + * @created.on 2016-01-16 * @since 1.0 */ @SuppressWarnings("PMD.DataClass") @@ -101,15 +101,6 @@ public class VersionInfo { return buildMeta; } - /** - * Sets the build meta-data. - * - * @param buildMeta The new build meta-data. - */ - public void setBuildMeta(final String buildMeta) { - this.buildMeta = buildMeta; - } - /** * Returns the meta-data prefix. * @@ -119,15 +110,6 @@ public class VersionInfo { return buildMetaPrefix; } - /** - * Sets the meta-data prefix. - * - * @param buildMetaPrefix The meta-data prefix. - */ - public void setBuildMetaPrefix(final String buildMetaPrefix) { - this.buildMetaPrefix = buildMetaPrefix; - } - /** * Returns the class name. * @@ -137,15 +119,6 @@ public class VersionInfo { return className; } - /** - * Sets the class name. - * - * @param className The new class name. - */ - public void setClassName(final String className) { - this.className = className; - } - /** * Returns the build epoch/Unix timestamp. * @@ -164,15 +137,6 @@ public class VersionInfo { return major; } - /** - * Sets the major version. - * - * @param major The new major version. - */ - public void setMajor(final int major) { - this.major = major; - } - /** * Returns the major version. * @@ -182,15 +146,6 @@ public class VersionInfo { return minor; } - /** - * Sets the minor version. - * - * @param minor The new minor version. - */ - public void setMinor(final int minor) { - this.minor = minor; - } - /** * Returns the package name. * @@ -200,15 +155,6 @@ public class VersionInfo { return packageName; } - /** - * Sets the package name. - * - * @param packageName The new package name. - */ - public void setPackageName(final String packageName) { - this.packageName = packageName; - } - /** * Returns the patch version. * @@ -218,15 +164,6 @@ public class VersionInfo { return patch; } - /** - * Sets the patch version. - * - * @param patch The new patch version. - */ - public void setPatch(final int patch) { - this.patch = patch; - } - /** * Returns the pre-release version. * @@ -236,15 +173,6 @@ public class VersionInfo { return preRelease; } - /** - * Sets the pre-release version. - * - * @param preRelease The new pre-release version. - */ - public void setPreRelease(final String preRelease) { - this.preRelease = preRelease; - } - /** * Returns the pre-release prefix. * @@ -254,15 +182,6 @@ public class VersionInfo { return preReleasePrefix; } - /** - * Sets the pre-release prefix. - * - * @param preReleasePrefix The new pre-release prefix. - */ - public void setPreReleasePrefix(final String preReleasePrefix) { - this.preReleasePrefix = preReleasePrefix; - } - /** * Returns the project name. * @@ -272,15 +191,6 @@ public class VersionInfo { return project; } - /** - * Sets the project name. - * - * @param project The new project name. - */ - public void setProject(final String project) { - this.project = project; - } - /** * Sames as {@link #getVersion()}. * @@ -299,15 +209,6 @@ public class VersionInfo { return separator; } - /** - * Sets the version separator. - * - * @param separator The new version separator. - */ - public void setSeparator(final String separator) { - this.separator = separator; - } - /** * Returns the full version string. * @@ -334,7 +235,106 @@ public class VersionInfo { + minor + separator + patch - + (preRelease.length() > 0 ? preReleasePrefix + preRelease : "") - + (buildMeta.length() > 0 ? buildMetaPrefix + buildMeta : ""); + + (!preRelease.isEmpty() ? preReleasePrefix + preRelease : "") + + (!buildMeta.isEmpty() ? buildMetaPrefix + buildMeta : ""); + } + + /** + * Sets the build meta-data. + * + * @param buildMeta The new build meta-data. + */ + public void setBuildMeta(final String buildMeta) { + this.buildMeta = buildMeta; + } + + /** + * Sets the meta-data prefix. + * + * @param buildMetaPrefix The meta-data prefix. + */ + public void setBuildMetaPrefix(final String buildMetaPrefix) { + this.buildMetaPrefix = buildMetaPrefix; + } + + /** + * Sets the class name. + * + * @param className The new class name. + */ + public void setClassName(final String className) { + this.className = className; + } + + /** + * Sets the major version. + * + * @param major The new major version. + */ + public void setMajor(final int major) { + this.major = major; + } + + /** + * Sets the minor version. + * + * @param minor The new minor version. + */ + public void setMinor(final int minor) { + this.minor = minor; + } + + /** + * Sets the package name. + * + * @param packageName The new package name. + */ + public void setPackageName(final String packageName) { + this.packageName = packageName; + } + + /** + * Sets the patch version. + * + * @param patch The new patch version. + */ + public void setPatch(final int patch) { + this.patch = patch; + } + + /** + * Sets the pre-release version. + * + * @param preRelease The new pre-release version. + */ + public void setPreRelease(final String preRelease) { + this.preRelease = preRelease; + } + + /** + * Sets the pre-release prefix. + * + * @param preReleasePrefix The new pre-release prefix. + */ + public void setPreReleasePrefix(final String preReleasePrefix) { + this.preReleasePrefix = preReleasePrefix; + } + + /** + * Sets the project name. + * + * @param project The new project name. + */ + public void setProject(final String project) { + this.project = project; + } + + /** + * Sets the version separator. + * + * @param separator The new version separator. + */ + public void setSeparator(final String separator) { + this.separator = separator; } } diff --git a/src/main/java/net/thauvin/erik/semver/VersionProcessor.java b/src/main/java/net/thauvin/erik/semver/VersionProcessor.java index 878f478..1c9f150 100644 --- a/src/main/java/net/thauvin/erik/semver/VersionProcessor.java +++ b/src/main/java/net/thauvin/erik/semver/VersionProcessor.java @@ -56,7 +56,7 @@ import java.util.Set; * The VersionProcessor class implements a semantic version annotation processor. * * @author Erik C. Thauvin - * @created 2016-01-13 + * @created.on 2016-01-13 * @since 1.0 */ @SuppressWarnings({"PMD.GuardLogStatement", "PMD.BeanMembersShouldSerialize"}) @@ -66,10 +66,24 @@ public class VersionProcessor extends AbstractProcessor { private Messager messager; + private static String getTemplate(final boolean isLocalTemplate, final Version version) { + final String template; + if (isLocalTemplate && Constants.DEFAULT_JAVA_TEMPLATE.equals(version.template())) { + template = Constants.DEFAULT_TEMPLATE_NAME; + } else if (Constants.DEFAULT_JAVA_TEMPLATE.equals(version.template()) && Constants.KOTLIN_TYPE + .equals(version.type())) { + template = Constants.DEFAULT_KOTLIN_TEMPLATE; + } else { + template = version.template(); + } + return template; + } + private void error(final String s) { log(Diagnostic.Kind.ERROR, s); } + @SuppressWarnings("PMD.UnusedPrivateMethod") private void error(final String s, final Throwable t) { log(Diagnostic.Kind.ERROR, t != null ? t.toString() : s); } @@ -77,7 +91,7 @@ public class VersionProcessor extends AbstractProcessor { private VersionInfo findValues(final Version version) throws IOException { final VersionInfo versionInfo = new VersionInfo(version); - if (version.properties().length() > 0) { + if (!version.properties().isEmpty()) { final File propsFile = getLocalFile(version.properties()); if (propsFile.isFile() && propsFile.canRead()) { note("Found properties: " + propsFile.getName() + " (" + propsFile.getAbsoluteFile().getParent() + ')'); @@ -180,15 +194,7 @@ public class VersionProcessor extends AbstractProcessor { versionInfo.setPackageName(packageElement.getQualifiedName().toString()); } note("Found version: " + versionInfo.getVersion()); - final String template; - if (isLocalTemplate && Constants.DEFAULT_JAVA_TEMPLATE.equals(version.template())) { - template = Constants.DEFAULT_TEMPLATE_NAME; - } else if (Constants.DEFAULT_JAVA_TEMPLATE.equals(version.template()) && Constants.KOTLIN_TYPE - .equals(version.type())) { - template = Constants.DEFAULT_KOTLIN_TEMPLATE; - } else { - template = version.template(); - } + final String template = getTemplate(isLocalTemplate, version); writeTemplate(version.type(), versionInfo, template); } catch (IOException | MustacheNotFoundException e) { diff --git a/src/main/java/net/thauvin/erik/semver/package.html b/src/main/java/net/thauvin/erik/semver/package.html index e37a084..1b1b126 100644 --- a/src/main/java/net/thauvin/erik/semver/package.html +++ b/src/main/java/net/thauvin/erik/semver/package.html @@ -1,35 +1,3 @@ - - diff --git a/src/main/resources/META-INF/services/javax.annotation.processing.Processor b/src/main/resources/META-INF/services/javax.annotation.processing.Processor index 44488e0..5ae1016 100644 --- a/src/main/resources/META-INF/services/javax.annotation.processing.Processor +++ b/src/main/resources/META-INF/services/javax.annotation.processing.Processor @@ -1 +1,33 @@ +# +# 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/src/main/resources/semver-kt.mustache b/src/main/resources/semver-kt.mustache index 0151a5e..0a58f86 100644 --- a/src/main/resources/semver-kt.mustache +++ b/src/main/resources/semver-kt.mustache @@ -1,38 +1,38 @@ /* - * This file is automatically generated. - * Do not modify! -- ALL CHANGES WILL BE ERASED! - */ - +* 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 - */ +* 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}}" +@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/src/main/resources/semver.mustache b/src/main/resources/semver.mustache index be65867..cd7c567 100644 --- a/src/main/resources/semver.mustache +++ b/src/main/resources/semver.mustache @@ -1,34 +1,34 @@ /* - * This file is automatically generated. - * Do not modify! -- ALL CHANGES WILL BE ERASED! - */ - +* 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 - */ +* 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}}"; +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."); - } +/** +* Disables the default constructor. +*/ +private {{className}}() { +throw new UnsupportedOperationException("Illegal constructor call."); +} } diff --git a/src/test/java/net/thauvin/erik/semver/ConstantsTest.java b/src/test/java/net/thauvin/erik/semver/ConstantsTest.java index 0847819..ace903e 100644 --- a/src/test/java/net/thauvin/erik/semver/ConstantsTest.java +++ b/src/test/java/net/thauvin/erik/semver/ConstantsTest.java @@ -38,13 +38,13 @@ import org.testng.annotations.Test; import java.util.ArrayList; import java.util.List; -import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertEquals; // NOPMD /** * The ConstantsTest class. * * @author Erik C. Thauvin - * @created 2019-04-14 + * @created.on 2019-04-14 * @since 1.0 */ public class ConstantsTest { diff --git a/src/test/java/net/thauvin/erik/semver/VersionInfoTest.java b/src/test/java/net/thauvin/erik/semver/VersionInfoTest.java index 47b0436..fe08c3f 100644 --- a/src/test/java/net/thauvin/erik/semver/VersionInfoTest.java +++ b/src/test/java/net/thauvin/erik/semver/VersionInfoTest.java @@ -37,13 +37,13 @@ import org.testng.annotations.Test; import java.util.Date; -import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertEquals; // NOPMD /** * The VersionInfoTest class. * * @author Erik C. Thauvin - * @created 2016-02-03 + * @created.on 2016-02-03 * @since 1.0 */ public class VersionInfoTest { diff --git a/src/test/java/net/thauvin/erik/semver/VersionProcessorTest.java b/src/test/java/net/thauvin/erik/semver/VersionProcessorTest.java index 5fe3e12..674bb31 100644 --- a/src/test/java/net/thauvin/erik/semver/VersionProcessorTest.java +++ b/src/test/java/net/thauvin/erik/semver/VersionProcessorTest.java @@ -38,13 +38,13 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Properties; -import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertEquals; // NOPMD /** * The VersionProcessorTest class. * * @author Erik C. Thauvin - * @created 2019-04-02 + * @created.on 2019-04-02 * @since 1.2.0 */ public class VersionProcessorTest { diff --git a/src/test/java/net/thauvin/erik/semver/VersionTest.java b/src/test/java/net/thauvin/erik/semver/VersionTest.java index 8c2a76e..0153b1d 100644 --- a/src/test/java/net/thauvin/erik/semver/VersionTest.java +++ b/src/test/java/net/thauvin/erik/semver/VersionTest.java @@ -38,7 +38,7 @@ import java.lang.annotation.Annotation; * The VersionTest class. * * @author Erik C. Thauvin - * @created 2019-04-02 + * @created.on 2019-04-02 * @since 1.2.0 */ @SuppressWarnings({"ClassExplicitlyAnnotation", "SameReturnValue", "java:S2187", "PMD.TestClassWithoutTestCases"}) diff --git a/updatewrappers.sh b/updatewrappers.sh deleted file mode 100755 index b841e09..0000000 --- a/updatewrappers.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# -# Version: 1.0.2 -# - -# set the examples directories -declare -a dirs=( - "${PWD##*/}" - "examples/java" - "examples/kotlin") -java8=true - -### - -pwd=$PWD -cyan=$(tput setaf 6) -green=$(tput setaf 2) -red=$(tput setaf 1) -std=$(tput sgr0) - -#if [ "$java8" = true ] -#then -# export JAVA_HOME="$JAVA8_HOME" -# export PATH="$(cygpath "$JAVA_HOME")/bin:$PATH" -#fi - -#kVer=$(kobaltw --version | awk '{print substr($2, 1, length($2)-1)}') -updateWrappers() { - curVer="$(gradle --version | awk '/Gradle/ {print $2}')" - if [ -d gradle ]; then - if [ "$curVer" != "$(./gradlew --version | awk '/Gradle/ {print $2}')" ]; then - gradle -q --console=plain wrapper - echo -e " $(./gradlew --version | awk '/Gradle/') ${green}UPDATED${std}" - else - echo -e " Gradle $curVer UP-TO-DATE" - fi - fi - # if [ -d kobalt ]; then - # kw=$(cut -d "=" -f 2 kobalt/wrapper/kobalt-wrapper.properties) - # if [ "$kw" = "$kVer" ] - # then - # echo -e " Kobalt $kw UP-TO-DATE" - # else - # echo -e "kobalt.version=$kVer" > kobalt/wrapper/kobalt-wrapper.properties - # echo -e " Kobalt $kVer ${green}UPDATED${std}" - # fi - # fi -} - -echo -e "Updating wrappers..." - -for d in "${!dirs[@]}"; do - if [ "$d" -ne 0 ]; then - cd "${dirs[d]}" || exit 1 - fi - echo -e " ${cyan}${dirs[d]}${std}" - updateWrappers - cd "$pwd" -done