diff --git a/examples/annotation-processor/java/build.gradle b/examples/annotation-processor/java/build.gradle index fe32be4..74eb072 100644 --- a/examples/annotation-processor/java/build.gradle +++ b/examples/annotation-processor/java/build.gradle @@ -16,7 +16,7 @@ defaultTasks 'run' 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 { annotationProcessor semverProcessor diff --git a/examples/annotation-processor/java/src/generated/java/com/example/GeneratedVersion.java b/examples/annotation-processor/java/src/generated/java/com/example/GeneratedVersion.java index 0a8bf0a..da0842c 100644 --- a/examples/annotation-processor/java/src/generated/java/com/example/GeneratedVersion.java +++ b/examples/annotation-processor/java/src/generated/java/com/example/GeneratedVersion.java @@ -12,22 +12,17 @@ import java.util.Date; * @author Semantic Version Annotation Processor */ public final class GeneratedVersion { - public final static String PROJECT = "Java Annotation Example"; - public final static Date BUILDDATE = new Date(1554530172611L); + public final static String PROJECT = "Java Example"; + public final static Date BUILDDATE = new Date(1556045173358L); 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 String PRERELEASE = ""; public final static String PRERELEASE_PREFIX = "-"; public final static String BUILDMETA = ""; public final static String BUILDMETA_PREFIX = "+"; public final static String SEPARATOR = "."; - - /** - * The full semantic version string. - */ - public final static String VERSION = Integer.toString(MAJOR) + SEPARATOR + Integer.toString(MINOR) + SEPARATOR - + Integer.toString(PATCH) + preReleaseWithPrefix() + buildMetaWithPrefix(); + public final static String VERSION = "2.8.0"; /** * Disables the default constructor. @@ -35,50 +30,4 @@ public final class GeneratedVersion { private GeneratedVersion() { 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; - } - } } diff --git a/examples/annotation-processor/java/version.properties b/examples/annotation-processor/java/version.properties index 80864e3..a2c1662 100644 --- a/examples/annotation-processor/java/version.properties +++ b/examples/annotation-processor/java/version.properties @@ -1,8 +1,8 @@ #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.major=2 -version.minor=7 +version.minor=8 version.patch=0 version.prerelease= version.project=Java Example diff --git a/examples/annotation-processor/kotlin/.gitignore b/examples/annotation-processor/kotlin/.gitignore index a78c5c2..638960b 100644 --- a/examples/annotation-processor/kotlin/.gitignore +++ b/examples/annotation-processor/kotlin/.gitignore @@ -62,7 +62,6 @@ dist/ ehthumbs.db fabric.properties gen/ -gradle.properties hs_err_pid* kobaltBuild kobaltw*-test diff --git a/examples/annotation-processor/kotlin/build.gradle.kts b/examples/annotation-processor/kotlin/build.gradle.kts index 190313f..2b688e4 100644 --- a/examples/annotation-processor/kotlin/build.gradle.kts +++ b/examples/annotation-processor/kotlin/build.gradle.kts @@ -13,7 +13,7 @@ plugins { defaultTasks(ApplicationPlugin.TASK_RUN_NAME) -var semverProcessor = "net.thauvin.erik:semver:1.1.1" +var semverProcessor = "net.thauvin.erik:semver:1.2.0" dependencies { kapt(semverProcessor) @@ -31,6 +31,12 @@ application { mainClassName = "com.example.Main" } +kapt { + arguments { + arg("semver.project.dir", projectDir) + } +} + tasks { "run"(JavaExec::class) { doFirst { diff --git a/examples/annotation-processor/kotlin/gradle.properties b/examples/annotation-processor/kotlin/gradle.properties index 170c210..93cd554 100644 --- a/examples/annotation-processor/kotlin/gradle.properties +++ b/examples/annotation-processor/kotlin/gradle.properties @@ -1 +1 @@ -kapt.use.worker.api=true +#kapt.use.worker.api=true diff --git a/examples/annotation-processor/kotlin/version.properties b/examples/annotation-processor/kotlin/version.properties index 4dce255..f7d4a9d 100644 --- a/examples/annotation-processor/kotlin/version.properties +++ b/examples/annotation-processor/kotlin/version.properties @@ -1,8 +1,8 @@ #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.major=11 -version.minor=10 +version.major=14 +version.minor=1 version.patch=0 version.prerelease= version.project=Kotlin Example diff --git a/examples/java/version.properties b/examples/java/version.properties index bcee704..3f24455 100644 --- a/examples/java/version.properties +++ b/examples/java/version.properties @@ -1,6 +1,6 @@ #Generated by the Semver Plugin for Gradle -#Mon Apr 15 19:06:46 PDT 2019 -version.buildmeta=20190415190646 +#Tue Apr 23 11:43:18 PDT 2019 +version.buildmeta=20190423114318 version.major=1 version.minor=1 version.patch=8 diff --git a/examples/kotlin/version.properties b/examples/kotlin/version.properties index 94dd37d..325a878 100644 --- a/examples/kotlin/version.properties +++ b/examples/kotlin/version.properties @@ -1,6 +1,6 @@ #Generated by the Semver Plugin for Gradle -#Mon Apr 15 12:45:13 PDT 2019 -version.buildmeta=20190415124513 +#Tue Apr 23 11:45:33 PDT 2019 +version.buildmeta=20190423114533 version.major=1 version.minor=2 version.patch=4 diff --git a/examples/test/build.gradle b/examples/test/build.gradle index 2b1e5d3..65879f0 100644 --- a/examples/test/build.gradle +++ b/examples/test/build.gradle @@ -1,8 +1,3 @@ -// plugins { -// id 'java' -// id 'application' -// id "net.thauvin.erik.gradle.semver" version "0.9.4-beta" -// } buildscript { repositories { mavenLocal() @@ -22,11 +17,15 @@ version = 1.0 def f = new File("version.properties") -dependencies { +def semverProcessor = 'net.thauvin.erik:semver:1.2.0' +dependencies { + annotationProcessor semverProcessor + compileOnly semverProcessor } repositories { + mavenLocal() jcenter() } diff --git a/preflightcheck.sh b/preflightcheck.sh index fdf6a88..27af677 100644 --- a/preflightcheck.sh +++ b/preflightcheck.sh @@ -1,9 +1,5 @@ #!/bin/bash -# -# Version: 1.1.1 -# - # set source and test locations src="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_args="compile exec:java" -### +# +# Version: 1.1.2 +# if [ "$java8" = true ] then @@ -109,7 +107,7 @@ checkDeps() { runGradle $(echo "${examples[ex]}" | cut -d " " -f 1) dU runKobalt $(echo "${examples[ex]}" | cut -d " " -f 1) checkVersions runMaven $(echo "${examples[ex]}" | cut -d " " -f 1) versions:display-dependency-updates - if [ "$ex" -eq "${#examples}"] + if [ "$ex" -eq "${#examples}" ] then read -p "Continue? [y/n]: " cont clear diff --git a/version.properties b/version.properties deleted file mode 100644 index ec9fc12..0000000 --- a/version.properties +++ /dev/null @@ -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