Cleanup before new release
This commit is contained in:
parent
c5a6e2220c
commit
dc27cb86e5
6 changed files with 17 additions and 44 deletions
1
.github_changelog_generator
Normal file
1
.github_changelog_generator
Normal file
|
@ -0,0 +1 @@
|
||||||
|
future-release=1.2.1
|
|
@ -1,9 +1,13 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [1.2.1](https://github.com/ethauvin/semver/tree/1.2.1) (2021-04-29)
|
## [1.2.1](https://github.com/ethauvin/semver/tree/1.2.1) (2023-09-29)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/ethauvin/semver/compare/1.2.0...1.2.1)
|
[Full Changelog](https://github.com/ethauvin/semver/compare/1.2.0...1.2.1)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Move from Gradle to bld [\#7](https://github.com/ethauvin/semver/issues/7)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
- NPE with Java 12 and Kotlin 1.3.30 [\#1](https://github.com/ethauvin/semver/issues/1)
|
- NPE with Java 12 and Kotlin 1.3.30 [\#1](https://github.com/ethauvin/semver/issues/1)
|
||||||
|
|
18
README.md
18
README.md
|
@ -1,11 +1,11 @@
|
||||||
# Semantic Version Annotation Processor
|
# Semantic Version Annotation Processor
|
||||||
|
|
||||||
[](https://opensource.org/licenses/BSD-3-Clause)
|
[](https://opensource.org/licenses/BSD-3-Clause)
|
||||||
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
||||||
[](https://rife2.com/bld)
|
[](https://rife2.com/bld)
|
||||||
[](https://github.com/ethauvin/semver/releases/latest)
|
[](https://github.com/ethauvin/semver/releases/latest)
|
||||||
[](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver)
|
|
||||||
[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/semver/)
|
[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/semver/)
|
||||||
|
[](https://central.sonatype.com/artifact/net.thauvin.erik/semver)
|
||||||
|
|
||||||
[](https://sonarcloud.io/dashboard?id=ethauvin_semver)
|
[](https://sonarcloud.io/dashboard?id=ethauvin_semver)
|
||||||
[](https://github.com/ethauvin/semver/actions/workflows/gradle.yml)
|
[](https://github.com/ethauvin/semver/actions/workflows/gradle.yml)
|
||||||
|
@ -17,6 +17,7 @@ An [annotation processor](https://docs.oracle.com/javase/8/docs/api/javax/annota
|
||||||
This processor was inspired by Cédric Beust's [version-processor](https://github.com/cbeust/version-processor) and works well in conjunction with the [__Semantic Version Plugin for Gradle__](https://github.com/ethauvin/semver-gradle).
|
This processor was inspired by Cédric Beust's [version-processor](https://github.com/cbeust/version-processor) and works well in conjunction with the [__Semantic Version Plugin for Gradle__](https://github.com/ethauvin/semver-gradle).
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
- [Template](#template)
|
- [Template](#template)
|
||||||
- [Default Template](#default-template)
|
- [Default Template](#default-template)
|
||||||
|
@ -33,7 +34,7 @@ This processor was inspired by Cédric Beust's [version-processor](https://githu
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
* Using annotation elements:
|
- Using annotation elements:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
import net.thauvin.erik.semver.Version;
|
import net.thauvin.erik.semver.Version;
|
||||||
|
@ -44,7 +45,7 @@ public class A {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
* Or using a [properties](hhttps://github.com/ethauvin/semver/blob/master/examples/java/version.properties) file:
|
- Or using a [properties](hhttps://github.com/ethauvin/semver/blob/master/examples/java/version.properties) file:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
import net.thauvin.erik.semver.Version;
|
import net.thauvin.erik.semver.Version;
|
||||||
|
@ -220,8 +221,8 @@ public class ExampleBuild extends Project {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Please look at [ExamapleBuild](https://github.com/ethauvin/semver/blob/master/examples/java/bld/src/bld/java/com/example/ExampleBuild.java) in the [examples/java/bld](https://github.com/ethauvin/semver/tree/master/examples/java/bld) directory for a sample.
|
|
||||||
|
|
||||||
|
Please look at [ExampleBuild](https://github.com/ethauvin/semver/blob/master/examples/java/bld/src/bld/java/com/example/ExampleBuild.java) in the [examples/java/bld](https://github.com/ethauvin/semver/tree/master/examples/java/bld) directory for a sample. It also shows how to incorporate the generated code into the `source tree`, more information is also available [here](https://forum.uwyn.com/post/36).
|
||||||
|
|
||||||
## Gradle
|
## Gradle
|
||||||
|
|
||||||
|
@ -239,7 +240,7 @@ dependencies {
|
||||||
compileOnly 'net.thauvin.erik:semver:1.2.1-SNAPSHOT'
|
compileOnly 'net.thauvin.erik:semver:1.2.1-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
options.compilerArgs += [ "-Asemver.project.dir=$projectDir" ]
|
options.compilerArgs += [ "-Asemver.project.dir=$projectDir" ]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -255,7 +256,7 @@ Please look at [build.gradle](https://github.com/ethauvin/semver/blob/master/exa
|
||||||
In order to also incorporate the generated source code into the `source tree`, add the following to [build.gradle](https://github.com/ethauvin/semver/blob/master/examples/java/build.gradle):
|
In order to also incorporate the generated source code into the `source tree`, add the following to [build.gradle](https://github.com/ethauvin/semver/blob/master/examples/java/build.gradle):
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
options.generatedSourceOutputDirectory.set(file("${projectDir}/src/generated/java"))
|
options.generatedSourceOutputDirectory.set(file("${projectDir}/src/generated/java"))
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -276,6 +277,7 @@ open class Main {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The [Kotlin default template](https://github.com/ethauvin/semver/blob/master/src/main/resources/semver-kt.mustache) implements the same static fields and functions as the [Java template](#default-template).
|
The [Kotlin default template](https://github.com/ethauvin/semver/blob/master/src/main/resources/semver-kt.mustache) implements the same static fields and functions as the [Java template](#default-template).
|
||||||
|
|
||||||
Please look at the [examples/kotlin](https://github.com/ethauvin/semver/tree/master/examples/kotlin) project for a [build.gradle.kts](https://github.com/ethauvin/semver/blob/master/examples/kotlin/build.gradle.kts) sample.
|
Please look at the [examples/kotlin](https://github.com/ethauvin/semver/tree/master/examples/kotlin) project for a [build.gradle.kts](https://github.com/ethauvin/semver/blob/master/examples/kotlin/build.gradle.kts) sample.
|
||||||
|
|
|
@ -137,13 +137,11 @@ public final class Constants {
|
||||||
* The kotlin type.
|
* The kotlin type.
|
||||||
*/
|
*/
|
||||||
public static final String KOTLIN_TYPE = "kt";
|
public static final String KOTLIN_TYPE = "kt";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The argument used to specify the project location.
|
* The argument used to specify the project location.
|
||||||
*/
|
*/
|
||||||
public static final String SEMVER_PROJECT_DIR_ARG = "semver.project.dir";
|
public static final String SEMVER_PROJECT_DIR_ARG = "semver.project.dir";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables the default constructor.
|
* Disables the default constructor.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,33 +1 @@
|
||||||
#
|
|
||||||
# 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
|
net.thauvin.erik.semver.VersionProcessor
|
||||||
|
|
|
@ -34,7 +34,7 @@ package net.thauvin.erik.semver;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.Date; // NOPMD
|
import java.util.Date;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue