Pre-1.0.0 release cleanup.
This commit is contained in:
parent
a6b5cd6420
commit
2d2e8a2aca
12 changed files with 31 additions and 88 deletions
|
@ -16,7 +16,7 @@ defaultTasks 'run'
|
||||||
|
|
||||||
compileJava.options.annotationProcessorGeneratedSourcesDirectory = file("${projectDir}/src/generated/java")
|
compileJava.options.annotationProcessorGeneratedSourcesDirectory = file("${projectDir}/src/generated/java")
|
||||||
|
|
||||||
def semverProcessor = "net.thauvin.erik:semver:1.1.1"
|
def semverProcessor = "net.thauvin.erik:semver:1.2.0"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
annotationProcessor semverProcessor
|
annotationProcessor semverProcessor
|
||||||
|
|
|
@ -12,22 +12,17 @@ import java.util.Date;
|
||||||
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
|
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
|
||||||
*/
|
*/
|
||||||
public final class GeneratedVersion {
|
public final class GeneratedVersion {
|
||||||
public final static String PROJECT = "Java Annotation Example";
|
public final static String PROJECT = "Java Example";
|
||||||
public final static Date BUILDDATE = new Date(1554530172611L);
|
public final static Date BUILDDATE = new Date(1556045173358L);
|
||||||
public final static int MAJOR = 2;
|
public final static int MAJOR = 2;
|
||||||
public final static int MINOR = 4;
|
public final static int MINOR = 8;
|
||||||
public final static int PATCH = 0;
|
public final static int PATCH = 0;
|
||||||
public final static String PRERELEASE = "";
|
public final static String PRERELEASE = "";
|
||||||
public final static String PRERELEASE_PREFIX = "-";
|
public final static String PRERELEASE_PREFIX = "-";
|
||||||
public final static String BUILDMETA = "";
|
public final static String BUILDMETA = "";
|
||||||
public final static String BUILDMETA_PREFIX = "+";
|
public final static String BUILDMETA_PREFIX = "+";
|
||||||
public final static String SEPARATOR = ".";
|
public final static String SEPARATOR = ".";
|
||||||
|
public final static String VERSION = "2.8.0";
|
||||||
/**
|
|
||||||
* The full semantic version string.
|
|
||||||
*/
|
|
||||||
public final static String VERSION = Integer.toString(MAJOR) + SEPARATOR + Integer.toString(MINOR) + SEPARATOR
|
|
||||||
+ Integer.toString(PATCH) + preReleaseWithPrefix() + buildMetaWithPrefix();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables the default constructor.
|
* Disables the default constructor.
|
||||||
|
@ -35,50 +30,4 @@ public final class GeneratedVersion {
|
||||||
private GeneratedVersion() {
|
private GeneratedVersion() {
|
||||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
throw new UnsupportedOperationException("Illegal constructor call.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the build metadata with {@value #BUILDMETA_PREFIX} prefix.
|
|
||||||
*
|
|
||||||
* @return The build metadata, if any.
|
|
||||||
*/
|
|
||||||
public static String buildMetaWithPrefix() {
|
|
||||||
return buildMetaWithPrefix(BUILDMETA_PREFIX);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the build metadata.
|
|
||||||
*
|
|
||||||
* @param prefix Prefix to prepend.
|
|
||||||
* @return The build metadata, if any.
|
|
||||||
*/
|
|
||||||
public static String buildMetaWithPrefix(final String prefix) {
|
|
||||||
if (BUILDMETA.length() > 0) {
|
|
||||||
return prefix + BUILDMETA;
|
|
||||||
} else {
|
|
||||||
return BUILDMETA;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the pre-release version with {@value #PRERELEASE_PREFIX} prefix.
|
|
||||||
*
|
|
||||||
* @return The pre-release version, if any.
|
|
||||||
*/
|
|
||||||
public static String preReleaseWithPrefix() {
|
|
||||||
return preReleaseWithPrefix(PRERELEASE_PREFIX);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the pre-release version.
|
|
||||||
*
|
|
||||||
* @param prefix The prefix to prepend.
|
|
||||||
* @return The pre-release version, if any.
|
|
||||||
*/
|
|
||||||
public static String preReleaseWithPrefix(final String prefix) {
|
|
||||||
if (PRERELEASE.length() > 0) {
|
|
||||||
return prefix + PRERELEASE;
|
|
||||||
} else {
|
|
||||||
return PRERELEASE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#Generated by the Semver Plugin for Gradle
|
#Generated by the Semver Plugin for Gradle
|
||||||
#Mon Apr 15 12:20:10 PDT 2019
|
#Tue Apr 23 11:46:10 PDT 2019
|
||||||
version.buildmeta=
|
version.buildmeta=
|
||||||
version.major=2
|
version.major=2
|
||||||
version.minor=7
|
version.minor=8
|
||||||
version.patch=0
|
version.patch=0
|
||||||
version.prerelease=
|
version.prerelease=
|
||||||
version.project=Java Example
|
version.project=Java Example
|
||||||
|
|
|
@ -62,7 +62,6 @@ dist/
|
||||||
ehthumbs.db
|
ehthumbs.db
|
||||||
fabric.properties
|
fabric.properties
|
||||||
gen/
|
gen/
|
||||||
gradle.properties
|
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
kobaltBuild
|
kobaltBuild
|
||||||
kobaltw*-test
|
kobaltw*-test
|
||||||
|
|
|
@ -13,7 +13,7 @@ plugins {
|
||||||
|
|
||||||
defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
|
defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
|
||||||
|
|
||||||
var semverProcessor = "net.thauvin.erik:semver:1.1.1"
|
var semverProcessor = "net.thauvin.erik:semver:1.2.0"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
kapt(semverProcessor)
|
kapt(semverProcessor)
|
||||||
|
@ -31,6 +31,12 @@ application {
|
||||||
mainClassName = "com.example.Main"
|
mainClassName = "com.example.Main"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kapt {
|
||||||
|
arguments {
|
||||||
|
arg("semver.project.dir", projectDir)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
"run"(JavaExec::class) {
|
"run"(JavaExec::class) {
|
||||||
doFirst {
|
doFirst {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
kapt.use.worker.api=true
|
#kapt.use.worker.api=true
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#Generated by the Semver Plugin for Gradle
|
#Generated by the Semver Plugin for Gradle
|
||||||
#Mon Apr 15 13:44:40 PDT 2019
|
#Tue Apr 23 11:46:40 PDT 2019
|
||||||
version.buildmeta=
|
version.buildmeta=
|
||||||
version.major=11
|
version.major=14
|
||||||
version.minor=10
|
version.minor=1
|
||||||
version.patch=0
|
version.patch=0
|
||||||
version.prerelease=
|
version.prerelease=
|
||||||
version.project=Kotlin Example
|
version.project=Kotlin Example
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#Generated by the Semver Plugin for Gradle
|
#Generated by the Semver Plugin for Gradle
|
||||||
#Mon Apr 15 19:06:46 PDT 2019
|
#Tue Apr 23 11:43:18 PDT 2019
|
||||||
version.buildmeta=20190415190646
|
version.buildmeta=20190423114318
|
||||||
version.major=1
|
version.major=1
|
||||||
version.minor=1
|
version.minor=1
|
||||||
version.patch=8
|
version.patch=8
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#Generated by the Semver Plugin for Gradle
|
#Generated by the Semver Plugin for Gradle
|
||||||
#Mon Apr 15 12:45:13 PDT 2019
|
#Tue Apr 23 11:45:33 PDT 2019
|
||||||
version.buildmeta=20190415124513
|
version.buildmeta=20190423114533
|
||||||
version.major=1
|
version.major=1
|
||||||
version.minor=2
|
version.minor=2
|
||||||
version.patch=4
|
version.patch=4
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
// plugins {
|
|
||||||
// id 'java'
|
|
||||||
// id 'application'
|
|
||||||
// id "net.thauvin.erik.gradle.semver" version "0.9.4-beta"
|
|
||||||
// }
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
@ -22,11 +17,15 @@ version = 1.0
|
||||||
|
|
||||||
def f = new File("version.properties")
|
def f = new File("version.properties")
|
||||||
|
|
||||||
dependencies {
|
def semverProcessor = 'net.thauvin.erik:semver:1.2.0'
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
annotationProcessor semverProcessor
|
||||||
|
compileOnly semverProcessor
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
|
||||||
# Version: 1.1.1
|
|
||||||
#
|
|
||||||
|
|
||||||
# set source and test locations
|
# set source and test locations
|
||||||
src="src/main/kotlin/net/thauvin/erik/gradle/semver/"
|
src="src/main/kotlin/net/thauvin/erik/gradle/semver/"
|
||||||
test="src/main/kotlin/net/thauvin/erik/gradle/semver/"
|
test="src/main/kotlin/net/thauvin/erik/gradle/semver/"
|
||||||
|
@ -25,7 +21,9 @@ gradle_opts="--console=plain --no-build-cache --no-daemon"
|
||||||
# maven arguments for examples
|
# maven arguments for examples
|
||||||
maven_args="compile exec:java"
|
maven_args="compile exec:java"
|
||||||
|
|
||||||
###
|
#
|
||||||
|
# Version: 1.1.2
|
||||||
|
#
|
||||||
|
|
||||||
if [ "$java8" = true ]
|
if [ "$java8" = true ]
|
||||||
then
|
then
|
||||||
|
@ -109,7 +107,7 @@ checkDeps() {
|
||||||
runGradle $(echo "${examples[ex]}" | cut -d " " -f 1) dU
|
runGradle $(echo "${examples[ex]}" | cut -d " " -f 1) dU
|
||||||
runKobalt $(echo "${examples[ex]}" | cut -d " " -f 1) checkVersions
|
runKobalt $(echo "${examples[ex]}" | cut -d " " -f 1) checkVersions
|
||||||
runMaven $(echo "${examples[ex]}" | cut -d " " -f 1) versions:display-dependency-updates
|
runMaven $(echo "${examples[ex]}" | cut -d " " -f 1) versions:display-dependency-updates
|
||||||
if [ "$ex" -eq "${#examples}"]
|
if [ "$ex" -eq "${#examples}" ]
|
||||||
then
|
then
|
||||||
read -p "Continue? [y/n]: " cont
|
read -p "Continue? [y/n]: " cont
|
||||||
clear
|
clear
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#Generated by the Semver Plugin for Gradle
|
|
||||||
#Thu Apr 11 17:57:36 PDT 2019
|
|
||||||
version.buildmeta=
|
|
||||||
version.major=1
|
|
||||||
version.minor=0
|
|
||||||
version.patch=0
|
|
||||||
version.prerelease=
|
|
||||||
version.semver=1.0.0
|
|
Loading…
Add table
Add a link
Reference in a new issue