diff --git a/README.html b/README.html index 3791922..54833fc 100644 --- a/README.html +++ b/README.html @@ -217,7 +217,7 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
In order to easily incorporate with existing projects, the property keys may be assigned custom values:
@Version(
- properties = "example.properties",
+ properties = "example.properties",
majorKey = "example.major",
minorKey = "example.minor",
patchKey = "example.patch",
@@ -239,27 +239,27 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
<dependency>
<groupId>net.thauvin.erik</groupId>
<artifactId>semver</artifactId>
- <version>0.9.7</version>
+ <version>0.9.6-beta</version>
</dependency>
Gradle
Class Generation
To install and run from Gradle, add the following to the build.gradle
file:
dependencies {
- compile 'net.thauvin.erik:semver:0.9.7'
+ compile 'net.thauvin.erik:semver:0.9.6-beta'
}
The GeneratedVersion
class will be automatically created in the build
directory upon compiling.
Class & Source Generation
In order to also incorporate the generated source code into the source tree
, use the EWERK Annotation Processor Plugin. Start by addding the following to the very top of the build.gradle
file:
plugins {
- id "com.ewerk.gradle.plugins.annotation-processor" version "1.0.2"
+ id "com.ewerk.gradle.plugins.annotation-processor" version "1.0.3"
}
Then add the following to the build.gradle
file:
dependencies {
- compileOnly 'net.thauvin.erik:semver:0.9.7'
+ compileOnly 'net.thauvin.erik:semver:0.9.6-beta'
}
annotationProcessor {
- library 'net.thauvin.erik:semver:0.9.7'
+ library 'net.thauvin.erik:semver:0.9.6-beta'
processor 'net.thauvin.erik.semver.VersionProcessor'
// sourcesDir 'src/generated/java'
}
@@ -273,8 +273,8 @@ compileJava {
Kobalt
To install and run from Kobalt, add the following to the Build.kt
file:
dependencies {
- apt("net.thauvin.erik:semver:0.9.7")
- compile("net.thauvin.erik:semver:0.9.7")
+ apt("net.thauvin.erik:semver:0.9.6-beta")
+ compile("net.thauvin.erik:semver:0.9.6-beta")
}
Please look at the Build.kt file in the example module directory for a sample.
Auto-Increment
diff --git a/README.md b/README.md
index b37691b..1c2b582 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,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).
## Examples
-
+
* Using annotation elements:
```java
@@ -80,7 +80,7 @@ public final class ${className} {
The Velocity variables are automatically filled in by the processor.
Please also look at this [example](https://github.com/ethauvin/mobibot/blob/master/version.vm) using [`java.time`](https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html)
-
+
## Elements & Properties
The following annotation elements and properties are available:
@@ -101,7 +101,7 @@ In order to easily incorporate with existing projects, the property keys may be
```java
@Version(
- properties = "example.properties",
+ properties = "example.properties",
majorKey = "example.major",
minorKey = "example.minor",
patchKey = "example.patch",
@@ -131,7 +131,7 @@ To install and run from [Maven](http://maven.apache.org/), configure an artifact
net.thauvin.erik
semver
- 0.9.7
+ 0.9.6-beta
```
@@ -143,7 +143,7 @@ To install and run from [Gradle](https://gradle.org/), add the following to the
```gradle
dependencies {
- compile 'net.thauvin.erik:semver:0.9.7'
+ compile 'net.thauvin.erik:semver:0.9.6-beta'
}
```
@@ -155,7 +155,7 @@ In order to also incorporate the generated source code into the `source tree`, u
```gradle
plugins {
- id "com.ewerk.gradle.plugins.annotation-processor" version "1.0.2"
+ id "com.ewerk.gradle.plugins.annotation-processor" version "1.0.3"
}
```
@@ -163,11 +163,11 @@ Then add the following to the `build.gradle` file:
```gradle
dependencies {
- compileOnly 'net.thauvin.erik:semver:0.9.7'
+ compileOnly 'net.thauvin.erik:semver:0.9.6-beta'
}
annotationProcessor {
- library 'net.thauvin.erik:semver:0.9.7'
+ library 'net.thauvin.erik:semver:0.9.6-beta'
processor 'net.thauvin.erik.semver.VersionProcessor'
// sourcesDir 'src/generated/java'
}
@@ -188,8 +188,8 @@ To install and run from [Kobalt](http://beust.com/kobalt/), add the following to
```gradle
dependencies {
- apt("net.thauvin.erik:semver:0.9.7")
- compile("net.thauvin.erik:semver:0.9.7")
+ apt("net.thauvin.erik:semver:0.9.6-beta")
+ compile("net.thauvin.erik:semver:0.9.6-beta")
}
```
diff --git a/build.gradle b/build.gradle
index d9d467e..5a62455 100644
--- a/build.gradle
+++ b/build.gradle
@@ -193,10 +193,12 @@ task wrapper(type: Wrapper) {
gradleVersion = gradle.gradleVersion
}
-task release(dependsOn: ['wrapper', 'clean', 'deploy']) << {
- group = 'Publishing'
- description = 'Releases new version.'
- isRelease = true
+task release(dependsOn: ['wrapper', 'clean', 'deploy']) {
+ doLast {
+ group = 'Publishing'
+ description = 'Releases new version.'
+ isRelease = true
+ }
}
task pandoc(type: Exec) {
diff --git a/example/build.gradle b/example/build.gradle
index f7625e6..379f4d4 100644
--- a/example/build.gradle
+++ b/example/build.gradle
@@ -1,5 +1,5 @@
plugins {
- id "com.ewerk.gradle.plugins.annotation-processor" version "1.0.2"
+ id "com.ewerk.gradle.plugins.annotation-processor" version "1.0.3"
}
apply plugin: 'java'
apply plugin: 'idea'
@@ -45,13 +45,13 @@ repositories {
}
dependencies {
- compileOnly 'net.thauvin.erik:semver:0.9.7'
+ compileOnly 'net.thauvin.erik:semver:+'
}
annotationProcessor {
// Update version, increment on release.
project.version = getVersion(isRelease)
- library 'net.thauvin.erik:semver:0.9.7'
+ library 'net.thauvin.erik:semver:+'
processor 'net.thauvin.erik.semver.VersionProcessor'
// sourcesDir 'src/generated/java'
}
@@ -81,10 +81,12 @@ task deploy(dependsOn: ['build', 'copyToDeploy']) {
mustRunAfter clean
}
-task release(dependsOn: ['wrapper', 'clean', 'deploy']) << {
- group = 'Publishing'
- description = 'Releases new version.'
- isRelease = true
+task release(dependsOn: ['wrapper', 'clean', 'deploy']) {
+ doLast {
+ group = 'Publishing'
+ description = 'Releases new version.'
+ isRelease = true
+ }
}
task wrapper(type: Wrapper) {
diff --git a/example/src/generated/java/net/thauvin/erik/semver/example/GeneratedVersion.java b/example/src/generated/java/net/thauvin/erik/semver/example/GeneratedVersion.java
index 13070df..bf0710c 100644
--- a/example/src/generated/java/net/thauvin/erik/semver/example/GeneratedVersion.java
+++ b/example/src/generated/java/net/thauvin/erik/semver/example/GeneratedVersion.java
@@ -14,7 +14,7 @@ import java.util.Date;
*/
public final class GeneratedVersion {
private final static String buildmeta = "";
- private final static Date date = new Date(1468888435317L);
+ private final static Date date = new Date(1490396459441L);
private final static int major = 3;
private final static int minor = 1;
private final static int patch = 49;