mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2026-02-08 00:34:18 +01:00
Put the correct api version information into the Version class.
This commit is contained in:
parent
62ed7dc473
commit
c07fe191ea
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
<project name="Sun Games Initiative Client Technologies" basedir="." default="all" xmlns:artifact="urn:maven-artifact-ant">
|
<project name="Sun Games Initiative Client Technologies" basedir="." default="all" xmlns:artifact="urn:maven-artifact-ant">
|
||||||
|
|
||||||
<property name="mvn.version" value="2.0.4"/>
|
<property name="api.version" value="2.0.5"/>
|
||||||
|
<property name="mvn.version" value="${api.version}-SNAPSHOT"/>
|
||||||
<property name="maven-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" />
|
<property name="maven-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" />
|
||||||
<property name="maven-repository-id" value="sonatype-nexus-staging" />
|
<property name="maven-repository-id" value="sonatype-nexus-staging" />
|
||||||
|
|
||||||
|
|
@ -72,6 +73,7 @@
|
||||||
<attribute name="target"/>
|
<attribute name="target"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<subant target="@{target}">
|
<subant target="@{target}">
|
||||||
|
<property name="api.version" value="${api.version}"/>
|
||||||
<fileset file="coreAPI/build.xml"/>
|
<fileset file="coreAPI/build.xml"/>
|
||||||
<fileset file="plugins/linux/build.xml"/>
|
<fileset file="plugins/linux/build.xml"/>
|
||||||
<fileset file="plugins/windows/build.xml"/>
|
<fileset file="plugins/windows/build.xml"/>
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,13 @@
|
||||||
todir="build/src/java/net/java/games/input/" overwrite="true">
|
todir="build/src/java/net/java/games/input/" overwrite="true">
|
||||||
<filterset>
|
<filterset>
|
||||||
<filter token="BUILD_NUMBER" value="${build.number}"/>
|
<filter token="BUILD_NUMBER" value="${build.number}"/>
|
||||||
|
<filter token="API_VERSION" value="${api.version}"/>
|
||||||
</filterset>
|
</filterset>
|
||||||
</copy>
|
</copy>
|
||||||
<javac srcdir="build/src/java" destdir="classes" debug="true" deprecation="true" source="1.4" target="1.4">
|
<javac srcdir="build/src/java" destdir="classes" debug="true" deprecation="true" source="1.4" target="1.4">
|
||||||
<include name="net/**" />
|
<include name="net/**" />
|
||||||
</javac>
|
</javac>
|
||||||
|
<echo message="Build version class for ${api.version} build ${build.number}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="jar" depends="init,compile">
|
<target name="jar" depends="init,compile">
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,14 @@ public final class Version {
|
||||||
/**
|
/**
|
||||||
* Version string of this build.
|
* 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@";
|
private static final String buildNumber = "@BUILD_NUMBER@";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Split so that ant does not replace the token;
|
* 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
|
* Returns the verison string and build number of
|
||||||
|
|
@ -105,8 +106,11 @@ public final class Version {
|
||||||
* @return The version string of this implementation.
|
* @return The version string of this implementation.
|
||||||
*/
|
*/
|
||||||
public static String getVersion() {
|
public static String getVersion() {
|
||||||
String version = apiVersion;
|
String version = "Unversioned";
|
||||||
if(!antToken.equals(buildNumber)) {
|
if(!antAPIVersionToken.equals(apiVersion)) {
|
||||||
|
version = apiVersion;
|
||||||
|
}
|
||||||
|
if(!antBuildNumberToken.equals(buildNumber)) {
|
||||||
version += "-b" + buildNumber;
|
version += "-b" + buildNumber;
|
||||||
}
|
}
|
||||||
return version;
|
return version;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue