Removed Kobalt.

This commit is contained in:
Erik C. Thauvin 2020-06-30 18:22:34 -07:00
parent f8101bb2e9
commit 1b706aedc5
7 changed files with 17 additions and 89 deletions

View file

@ -1,7 +1,7 @@
# Semantic Version Annotation Processor
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://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) [ ![Download](https://api.bintray.com/packages/ethauvin/maven/SemVer/images/download.svg) ](https://bintray.com/ethauvin/maven/SemVer/_latestVersion)\
[![Known Vulnerabilities](https://snyk.io/test/github/ethauvin/semver/badge.svg?targetFile=build.gradle)](https://snyk.io/test/github/ethauvin/semver?targetFile=build.gradle) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_semver&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_semver) [![Build Status](https://travis-ci.org/ethauvin/semver.svg?branch=master)](https://travis-ci.org/ethauvin/semver) [![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)
[![Known Vulnerabilities](https://snyk.io/test/github/ethauvin/semver/badge.svg?targetFile=build.gradle)](https://snyk.io/test/github/ethauvin/semver?targetFile=build.gradle) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_semver&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_semver) [![Build Status](https://travis-ci.com/ethauvin/semver.svg?branch=master)](https://travis-ci.com/ethauvin/semver) [![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](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)
- [Kotlin](#kotlin)
- [Kotlin & Gradle](#kotlin--gradle)
- [Kobalt](#kobalt)
- [Auto-Increment](#auto-increment)
## 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.
## 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
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).

View file

@ -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"
}
}

View file

@ -1 +0,0 @@
kobalt.version=1.0.129

View file

@ -1,2 +0,0 @@
#!/usr/bin/env sh
java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $*

View file

@ -1,4 +0,0 @@
@echo off
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
java -jar "%DIRNAME%/kobalt/wrapper/kobalt-wrapper.jar" %*

View file

@ -19,13 +19,13 @@ 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
#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)}')
#kVer=$(kobaltw --version | awk '{print substr($2, 1, length($2)-1)}')
updateWrappers() {
curVer="$(gradle --version | awk '/Gradle/ {print $2}')"
if [ -d gradle ]; then
@ -36,16 +36,16 @@ updateWrappers() {
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
# 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..."