Removed Kobalt.
This commit is contained in:
parent
f8101bb2e9
commit
1b706aedc5
7 changed files with 17 additions and 89 deletions
17
README.md
17
README.md
|
@ -1,7 +1,7 @@
|
||||||
# Semantic Version Annotation Processor
|
# Semantic Version Annotation Processor
|
||||||
|
|
||||||
[](http://opensource.org/licenses/BSD-3-Clause) [](https://github.com/ethauvin/semver/releases/latest) [](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver) [  ](https://bintray.com/ethauvin/maven/SemVer/_latestVersion)\
|
[](http://opensource.org/licenses/BSD-3-Clause) [](https://github.com/ethauvin/semver/releases/latest) [](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver) [  ](https://bintray.com/ethauvin/maven/SemVer/_latestVersion)\
|
||||||
[](https://snyk.io/test/github/ethauvin/semver?targetFile=build.gradle) [](https://sonarcloud.io/dashboard?id=ethauvin_semver) [](https://travis-ci.org/ethauvin/semver) [](https://ci.appveyor.com/project/ethauvin/semver) [](https://circleci.com/gh/ethauvin/semver/tree/master)
|
[](https://snyk.io/test/github/ethauvin/semver?targetFile=build.gradle) [](https://sonarcloud.io/dashboard?id=ethauvin_semver) [](https://travis-ci.com/ethauvin/semver) [](https://ci.appveyor.com/project/ethauvin/semver) [](https://circleci.com/gh/ethauvin/semver/tree/master)
|
||||||
|
|
||||||
An [annotation processor](https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html) that automatically generates a `GeneratedVersion` class based on a [Mustache](https://mustache.github.io/) template and containing the [semantic version](http://semver.org/) (major, minor, patch, etc.) that is read from a [Properties](https://docs.oracle.com/javase/tutorial/essential/environment/properties.html) file or defined in the [annotation](https://docs.oracle.com/javase/tutorial/java/annotations/basics.html).
|
An [annotation processor](https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html) that automatically generates a `GeneratedVersion` class based on a [Mustache](https://mustache.github.io/) template and containing the [semantic version](http://semver.org/) (major, minor, patch, etc.) that is read from a [Properties](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).
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ This processor was inspired by Cédric Beust's [version-processor](https://githu
|
||||||
- [Class & Source Generation](#class--source-generation)
|
- [Class & Source Generation](#class--source-generation)
|
||||||
- [Kotlin](#kotlin)
|
- [Kotlin](#kotlin)
|
||||||
- [Kotlin & Gradle](#kotlin--gradle)
|
- [Kotlin & Gradle](#kotlin--gradle)
|
||||||
- [Kobalt](#kobalt)
|
|
||||||
- [Auto-Increment](#auto-increment)
|
- [Auto-Increment](#auto-increment)
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
@ -267,20 +266,6 @@ kapt {
|
||||||
|
|
||||||
The directory containing the configuration files (`version.properties`, `version.mustache`) must be specified using the `semver.project.dir` processor argument.
|
The directory containing the configuration files (`version.properties`, `version.mustache`) must be specified using the `semver.project.dir` processor argument.
|
||||||
|
|
||||||
## Kobalt
|
|
||||||
|
|
||||||
To install and run from [Kobalt](https://beust.com/kobalt/), add the following to [Build.kt](https://github.com/ethauvin/semver/blob/master/examples/java/kobalt/src/Build.kt):
|
|
||||||
|
|
||||||
```gradle
|
|
||||||
dependencies {
|
|
||||||
apt("net.thauvin.erik:semver:1.2.0")
|
|
||||||
compileOnly("net.thauvin.erik:semver:1.2.0")
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Please look at [Build.kt](https://github.com/ethauvin/semver/blob/master/examples/java/kobalt/src/Build.kt) in the [examples/java](https://github.com/ethauvin/semver/tree/master/examples/java) directory for a sample.
|
|
||||||
|
|
||||||
|
|
||||||
## Auto-Increment
|
## Auto-Increment
|
||||||
|
|
||||||
Incrementing the version is best left to your favorite build system. For a solution using Gradle, please have a look at the [__Semver Version Plugin for Gradle__](https://github.com/ethauvin/semver-gradle).
|
Incrementing the version is best left to your favorite build system. For a solution using Gradle, please have a look at the [__Semver Version Plugin for Gradle__](https://github.com/ethauvin/semver-gradle).
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
import com.beust.kobalt.*
|
|
||||||
import com.beust.kobalt.plugin.application.*
|
|
||||||
import com.beust.kobalt.plugin.apt.*
|
|
||||||
import com.beust.kobalt.plugin.java.javaCompiler
|
|
||||||
import com.beust.kobalt.plugin.packaging.*
|
|
||||||
|
|
||||||
// ./kobaltw run
|
|
||||||
|
|
||||||
val bs = buildScript {
|
|
||||||
repos(localMaven())
|
|
||||||
}
|
|
||||||
|
|
||||||
val example = project {
|
|
||||||
|
|
||||||
name = "example"
|
|
||||||
version = "1.0"
|
|
||||||
|
|
||||||
val mainClassName = "com.example.App"
|
|
||||||
val processorJar = "net.thauvin.erik:semver:1.2.0"
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
apt(processorJar)
|
|
||||||
compileOnly(processorJar)
|
|
||||||
}
|
|
||||||
|
|
||||||
apt {
|
|
||||||
//outputDir = "../src/generated/java/"
|
|
||||||
}
|
|
||||||
|
|
||||||
javaCompiler {
|
|
||||||
args("-source", "1.8", "-target", "1.8")
|
|
||||||
}
|
|
||||||
|
|
||||||
assemble {
|
|
||||||
jar {
|
|
||||||
manifest {
|
|
||||||
attributes("Main-Class", mainClassName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
application {
|
|
||||||
mainClass = mainClassName
|
|
||||||
}
|
|
||||||
|
|
||||||
application {
|
|
||||||
taskName = "runExample"
|
|
||||||
mainClass = "com.example.Example"
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
kobalt.version=1.0.129
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $*
|
|
|
@ -1,4 +0,0 @@
|
||||||
@echo off
|
|
||||||
set DIRNAME=%~dp0
|
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
|
||||||
java -jar "%DIRNAME%/kobalt/wrapper/kobalt-wrapper.jar" %*
|
|
|
@ -19,13 +19,13 @@ green=$(tput setaf 2)
|
||||||
red=$(tput setaf 1)
|
red=$(tput setaf 1)
|
||||||
std=$(tput sgr0)
|
std=$(tput sgr0)
|
||||||
|
|
||||||
if [ "$java8" = true ]
|
#if [ "$java8" = true ]
|
||||||
then
|
#then
|
||||||
export JAVA_HOME="$JAVA8_HOME"
|
# export JAVA_HOME="$JAVA8_HOME"
|
||||||
export PATH="$(cygpath "$JAVA_HOME")/bin:$PATH"
|
# export PATH="$(cygpath "$JAVA_HOME")/bin:$PATH"
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
kVer=$(kobaltw --version | awk '{print substr($2, 1, length($2)-1)}')
|
#kVer=$(kobaltw --version | awk '{print substr($2, 1, length($2)-1)}')
|
||||||
updateWrappers() {
|
updateWrappers() {
|
||||||
curVer="$(gradle --version | awk '/Gradle/ {print $2}')"
|
curVer="$(gradle --version | awk '/Gradle/ {print $2}')"
|
||||||
if [ -d gradle ]; then
|
if [ -d gradle ]; then
|
||||||
|
@ -36,16 +36,16 @@ updateWrappers() {
|
||||||
echo -e " Gradle $curVer UP-TO-DATE"
|
echo -e " Gradle $curVer UP-TO-DATE"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -d kobalt ]; then
|
# if [ -d kobalt ]; then
|
||||||
kw=$(cut -d "=" -f 2 kobalt/wrapper/kobalt-wrapper.properties)
|
# kw=$(cut -d "=" -f 2 kobalt/wrapper/kobalt-wrapper.properties)
|
||||||
if [ "$kw" = "$kVer" ]
|
# if [ "$kw" = "$kVer" ]
|
||||||
then
|
# then
|
||||||
echo -e " Kobalt $kw UP-TO-DATE"
|
# echo -e " Kobalt $kw UP-TO-DATE"
|
||||||
else
|
# else
|
||||||
echo -e "kobalt.version=$kVer" > kobalt/wrapper/kobalt-wrapper.properties
|
# echo -e "kobalt.version=$kVer" > kobalt/wrapper/kobalt-wrapper.properties
|
||||||
echo -e " Kobalt $kVer ${green}UPDATED${std}"
|
# echo -e " Kobalt $kVer ${green}UPDATED${std}"
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
}
|
}
|
||||||
|
|
||||||
echo -e "Updating wrappers..."
|
echo -e "Updating wrappers..."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue