diff --git a/common.gradle b/common.gradle index 33246566c..87dbf73eb 100644 --- a/common.gradle +++ b/common.gradle @@ -9,7 +9,7 @@ apply plugin: 'maven' //String jmeVersion = rootProject.version; String mavenGroupId = 'com.jme3' -String mavenVersion = jmeVersion + jmeVersionSuffix //'-SNAPSHOT' +String mavenVersion = jmeVersion + '-' + jmeVersionTag //'-SNAPSHOT' sourceCompatibility = '1.5' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' diff --git a/gradle.properties b/gradle.properties index 2ce238e65..dc2b1e429 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,8 +2,8 @@ jmeVersion = 3.0.10 # Version used for application and settings folder, no spaces! jmeMainVersion = 3.1 -# Version addition -pre-alpha-svn, -Stable, -Beta -jmeVersionSuffix = -pre-alpha-svn +# Version addition pre-alpha-svn, Stable, Beta +jmeVersionTag = pre-alpha-svn # specify if SDK and Native libraries get built buildSdkProject = true diff --git a/jme3-core/build.gradle b/jme3-core/build.gradle index c5d2b7d2a..1d680cd52 100644 --- a/jme3-core/build.gradle +++ b/jme3-core/build.gradle @@ -12,5 +12,15 @@ sourceSets { } } +task updateVersion << { + ant.replaceregexp( + file: 'src/main/java/com/jme3/system/JmeVersion.java', + match: 'private static final String FULL_NAME = (.*);', + replace: 'private static final String FULL_NAME = "jMonkeyEngine ' + jmeVersion + ' (' + jmeVersionTag + ')";', + byline: 'true') +} + +compileJava.dependsOn(updateVersion) + dependencies { } diff --git a/sdk/build.gradle b/sdk/build.gradle index cd6e58e0b..07bf0fd74 100644 --- a/sdk/build.gradle +++ b/sdk/build.gradle @@ -389,12 +389,12 @@ copyTestSources.outputs.dir "JME3TestsTemplate/src/" copyTestSources.outputs.dir "JME3TestsTemplateAndroid/src/" ant.properties['plugins.version'] = jmeVersion -ant.properties['app.version']= jmeMainVersion + jmeVersionSuffix +ant.properties['app.version']= jmeMainVersion + "-" + jmeVersionTag task buildSdk(dependsOn: [copyBaseLibs, copyProjectLibs, createProjectXml, createBaseXml, copyTestSources]) <<{ ant.propertyfile(file: "nbproject/project.properties") { entry( key: "plugins.version", value: "${jmeVersion}") - entry( key: "app.version", value: "${jmeMainVersion + jmeVersionSuffix}") + entry( key: "app.version", value: "${jmeMainVersion + "-" + jmeVersionTag}") } ant.ant(dir: ".", antfile: "build.xml", target: "build") }