aboutsummaryrefslogtreecommitdiffstats
path: root/coreAPI
diff options
context:
space:
mode:
authorendolf <[email protected]>2011-03-23 18:11:22 +0000
committerendolf <[email protected]>2011-03-23 18:11:22 +0000
commitb3bf97b41754c156e90636bcbef15590071f47f1 (patch)
treed6a21954ee2bda7805b1b0fb7898f345eeb55672 /coreAPI
parentf51c6f9c7a458e96c3e5bcc8944a66a2e92fcdac (diff)
Put the correct api version information into the Version class.
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@243 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'coreAPI')
-rw-r--r--coreAPI/build.xml2
-rw-r--r--coreAPI/src/java/net/java/games/input/Version.java12
2 files changed, 10 insertions, 4 deletions
diff --git a/coreAPI/build.xml b/coreAPI/build.xml
index d0ecade..f585b00 100644
--- a/coreAPI/build.xml
+++ b/coreAPI/build.xml
@@ -23,11 +23,13 @@
todir="build/src/java/net/java/games/input/" overwrite="true">
<filterset>
<filter token="BUILD_NUMBER" value="${build.number}"/>
+ <filter token="API_VERSION" value="${api.version}"/>
</filterset>
</copy>
<javac srcdir="build/src/java" destdir="classes" debug="true" deprecation="true" source="1.4" target="1.4">
<include name="net/**" />
</javac>
+ <echo message="Build version class for ${api.version} build ${build.number}"/>
</target>
<target name="jar" depends="init,compile">
diff --git a/coreAPI/src/java/net/java/games/input/Version.java b/coreAPI/src/java/net/java/games/input/Version.java
index 06491d1..1aac468 100644
--- a/coreAPI/src/java/net/java/games/input/Version.java
+++ b/coreAPI/src/java/net/java/games/input/Version.java
@@ -89,13 +89,14 @@ public final class Version {
/**
* Version string of this build.
*/
- private static final String apiVersion = "2.0.1";
+ private static final String apiVersion = "@API_VERSION@";
private static final String buildNumber = "@BUILD_NUMBER@";
/*
* Split so that ant does not replace the token;
*/
- private static final String antToken = "@BUILD_" + "NUMBER@";
+ private static final String antBuildNumberToken = "@BUILD_" + "NUMBER@";
+ private static final String antAPIVersionToken = "@API_" + "VERSION@";
/**
* Returns the verison string and build number of
@@ -105,8 +106,11 @@ public final class Version {
* @return The version string of this implementation.
*/
public static String getVersion() {
- String version = apiVersion;
- if(!antToken.equals(buildNumber)) {
+ String version = "Unversioned";
+ if(!antAPIVersionToken.equals(apiVersion)) {
+ version = apiVersion;
+ }
+ if(!antBuildNumberToken.equals(buildNumber)) {
version += "-b" + buildNumber;
}
return version;