From a3f2ef50ad33c58a240a17fcf03e415d772207c3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 28 Mar 2013 20:06:30 +0100 Subject: Bug 588: Adding jogamp.version property, i.e. 2.0.2-rc- used for Manifest ; Common jogamp_int_version for Android. Until 2.0.2 gets released, the version string is 2.0.2-rc- and used in the Manifest for IMPLEMENTATION_VERSION. The previous build version name of IMPLEMENTATION_VERSION goes into the new tag IMPLEMENTATION_BUILD. Further more, we use a common jogamp_int_version for Android, to make life more easy. --- src/java/com/jogamp/common/util/JogampVersion.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/java/com/jogamp') diff --git a/src/java/com/jogamp/common/util/JogampVersion.java b/src/java/com/jogamp/common/util/JogampVersion.java index de65f90..c44b1db 100644 --- a/src/java/com/jogamp/common/util/JogampVersion.java +++ b/src/java/com/jogamp/common/util/JogampVersion.java @@ -40,7 +40,11 @@ import jogamp.common.os.AndroidUtils; public class JogampVersion { + /** See {@link #getImplementationBuild()} */ + public static final Attributes.Name IMPLEMENTATION_BUILD = new Attributes.Name("Implementation-Build"); + /** See {@link #getImplementationBranch()} */ public static final Attributes.Name IMPLEMENTATION_BRANCH = new Attributes.Name("Implementation-Branch"); + /** See {@link #getImplementationCommit()} */ public static final Attributes.Name IMPLEMENTATION_COMMIT = new Attributes.Name("Implementation-Commit"); private String packageName; @@ -113,10 +117,23 @@ public class JogampVersion { return this.getAttribute(Attributes.Name.EXTENSION_NAME); } + /** + * Returns the implementation build number, e.g. 2.0-b456-201303281921. + */ + public final String getImplementationBuild() { + return this.getAttribute(GlueGenVersion.IMPLEMENTATION_BUILD); + } + + /** + * Returns the SCM branch name + */ public final String getImplementationBranch() { return this.getAttribute(GlueGenVersion.IMPLEMENTATION_BRANCH); } + /** + * Returns the SCM version of the last commit, e.g. git's sha1 + */ public final String getImplementationCommit() { return this.getAttribute(GlueGenVersion.IMPLEMENTATION_COMMIT); } @@ -137,6 +154,13 @@ public class JogampVersion { return this.getAttribute(Attributes.Name.IMPLEMENTATION_URL); } + /** + * Retruns the {@link Attributes.Name#IMPLEMENTATION_VERSION IMPLEMENTATION_VERSION}. + *

+ * E.g. 2.0.2-rc-201303281050 for snapshots prior to 2.0.2 release + * and 2.0.2 for the upcoming release. + *

+ */ public final String getImplementationVersion() { return this.getAttribute(Attributes.Name.IMPLEMENTATION_VERSION); } @@ -176,6 +200,7 @@ public class JogampVersion { sb.append("Implementation Vendor ID: ").append(getImplementationVendorID()).append(nl); sb.append("Implementation URL: ").append(getImplementationURL()).append(nl); sb.append("Implementation Version: ").append(getImplementationVersion()).append(nl); + sb.append("Implementation Build: ").append(getImplementationBuild()).append(nl); sb.append("Implementation Branch: ").append(getImplementationBranch()).append(nl); sb.append("Implementation Commit: ").append(getImplementationCommit()).append(nl); if(null != getAndroidPackageVersionName()) { -- cgit v1.2.3