Getting ready for 1.2.0 release.

This commit is contained in:
Erik C. Thauvin 2019-04-01 01:51:57 -07:00
parent 45a90d1353
commit 55d2e9e0d7
11 changed files with 156 additions and 74 deletions

View file

@ -5,7 +5,7 @@ apply plugin: 'application'
defaultTasks 'run'
def semverProcessor = 'net.thauvin.erik:semver:1.1.1'
def semverProcessor = 'net.thauvin.erik:semver:1.2.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8

View file

@ -12,23 +12,23 @@ import java.util.Date;
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
*/
public final class GeneratedVersion {
public final static String PRERELEASE_PREFIX = "-";
public final static String BUILDMETA_PREFIX = "+";
public final static String PROJECT = "Example";
public final static Date BUILDDATE = new Date(1554009013319L);
public final static Date BUILDDATE = new Date(1554108013631L);
public final static int MAJOR = 2;
public final static int MINOR = 17;
public final static int MINOR = 0;
public final static int PATCH = 52;
public final static String PRERELEASE = "beta";
public final static String PRERELEASE_PREFIX = "-";
public final static String BUILDMETA = "007";
public final static String BUILDMETA_PREFIX = "+";
public final static String SEPARATOR = "";
/**
* The full version string.
* <p>
* Formatted as:
* <blockquote>
* <code>MAJOR.MINOR.PATCH[-PRERELEASE][+BUILDMETADATA]</code>
* <code>[MAJOR][SEPARATOR][MINOR][SEPARATOR][PATCH][[PRERELEASE_PREFIX][PRERELEASE]][[BUILDMETA_PREFIX][BUILDMETA]]</code>
* </blockquote>
* <p>
* For example:
@ -39,10 +39,8 @@ public final class GeneratedVersion {
* <li><code>1.0.0-alpha+001</code></li>
* </ul>
*/
public final static String VERSION = Integer.toString(MAJOR) + '.'
+ Integer.toString(MINOR) + '.'
+ Integer.toString(PATCH)
+ preReleaseWithPrefix() + buildMetaWithPrefix();
public final static String VERSION = Integer.toString(MAJOR) + SEPARATOR + Integer.toString(MINOR) + SEPARATOR
+ Integer.toString(PATCH) + preReleaseWithPrefix() + buildMetaWithPrefix();
/**
* Disables the default constructor.
@ -70,7 +68,7 @@ public final class GeneratedVersion {
* @return The build metadata, if any.
*/
public static String buildMetaWithPrefix(final String prefix) {
if (BUILDMETA.length() > 0 && prefix.length() > 0) {
if (BUILDMETA.length() > 0) {
return prefix + BUILDMETA;
} else {
return BUILDMETA;
@ -93,10 +91,10 @@ public final class GeneratedVersion {
* @return The pre-release version, if any.
*/
public static String preReleaseWithPrefix(final String prefix) {
if (PRERELEASE.length() > 0 && prefix.length() > 0) {
if (PRERELEASE.length() > 0) {
return prefix + PRERELEASE;
} else {
return PRERELEASE;
}
}
}
}

View file

@ -2,7 +2,7 @@
#Sat Mar 30 15:48:08 PDT 2019
version.buildmeta=007
version.major=2
version.minor=17
version.minor=0
version.patch=52
version.prerelease=beta
version.project=Example

View file

@ -6,7 +6,7 @@
<compilerSettings />
<compilerArguments>
<option name="destination" value="$MODULE_DIR$/../../build/classes/kotlin/main" />
<option name="classpath" value="$MAVEN_REPOSITORY$/net/thauvin/erik/semver/1.1.1/semver-1.1.1.jar;C:/Users/erik/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.21/4bcc2012b84840e19e1e28074284cac908be0295/kotlin-stdlib-1.3.21.jar;C:/Users/erik/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.21/f30e4a9897913e53d778f564110bafa1fef46643/kotlin-stdlib-common-1.3.21.jar;C:/Users/erik/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar" />
<option name="classpath" value="$MAVEN_REPOSITORY$/net/thauvin/erik/semver/1.2.0/semver-1.2.0.jar;C:/Users/erik/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.21/4bcc2012b84840e19e1e28074284cac908be0295/kotlin-stdlib-1.3.21.jar;C:/Users/erik/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.21/f30e4a9897913e53d778f564110bafa1fef46643/kotlin-stdlib-common-1.3.21.jar;C:/Users/erik/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar" />
<option name="noStdlib" value="true" />
<option name="noReflect" value="true" />
<option name="moduleName" value="examples-kotlin" />
@ -52,8 +52,8 @@
</library>
</orderEntry>
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.3.21" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: net.thauvin.erik:semver:1.1.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: net.thauvin.erik:semver:1.2.0" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.21" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains:annotations:13.0" level="project" />
</component>
</module>
</module>

View file

@ -10,7 +10,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)