Fix version naming. Use version-branch-SNAPSHOT for local builds, add custom version name property.

fix-openal-soft-deadlink
Riccardo Balbo 5 years ago committed by Riccardo Balbo
parent e304c5bb6d
commit 816ab99ac5
  1. 12
      .github/workflows/main.yml
  2. 2
      common-android-app.gradle
  3. 8
      common.gradle
  4. 17
      gradle.properties
  5. 45
      version.gradle

@ -75,7 +75,7 @@ jobs:
# Build # Build
# Note: since this is crossbuild we use the buildForPlatforms filter to tell # Note: since this is crossbuild we use the buildForPlatforms filter to tell
# the buildscript wich platforms it should build for. # the buildscript wich platforms it should build for.
gradle --no-daemon -PbuildForPlatforms=LinuxArm,LinuxArmHF,LinuxArm64 -PbuildNativeProjects=true \ gradle -PuseCommitHashAsVersionName=true --no-daemon -PbuildForPlatforms=LinuxArm,LinuxArmHF,LinuxArm64 -PbuildNativeProjects=true \
:jme3-bullet-native:assemble :jme3-bullet-native:assemble
- name: Upload natives - name: Upload natives
@ -99,7 +99,7 @@ jobs:
- name: Build - name: Build
run: | run: |
gradle --no-daemon -PbuildNativeProjects=true \ gradle -PuseCommitHashAsVersionName=true --no-daemon -PbuildNativeProjects=true \
:jme3-android-native:assemble \ :jme3-android-native:assemble \
:jme3-bullet-native-android:assemble :jme3-bullet-native-android:assemble
@ -159,7 +159,7 @@ jobs:
fi fi
# Build # Build
gradle --no-daemon -PbuildNativeProjects=true -Dmaven.repo.local="$PWD/dist/maven" \ gradle -PuseCommitHashAsVersionName=true --no-daemon -PbuildNativeProjects=true -Dmaven.repo.local="$PWD/dist/maven" \
build \ build \
:jme3-bullet-native:build :jme3-bullet-native:build
@ -238,7 +238,7 @@ jobs:
shell: bash shell: bash
run: | run: |
# Build # Build
gradle -PskipPrebuildLibraries=true build gradle -PuseCommitHashAsVersionName=true -PskipPrebuildLibraries=true build
if [ "${{ matrix.deploy }}" = "true" ]; if [ "${{ matrix.deploy }}" = "true" ];
then then
@ -247,7 +247,7 @@ jobs:
sudo apt-get install -y zip sudo apt-get install -y zip
# Create the zip release and the javadoc # Create the zip release and the javadoc
gradle -PskipPrebuildLibraries=true mergedJavadoc createZipDistribution gradle -PuseCommitHashAsVersionName=true -PskipPrebuildLibraries=true mergedJavadoc createZipDistribution
# We prepare the release for deploy # We prepare the release for deploy
mkdir -p ./dist/release/ mkdir -p ./dist/release/
@ -255,7 +255,7 @@ jobs:
# Create the maven artifacts # Create the maven artifacts
mkdir -p ./dist/maven/ mkdir -p ./dist/maven/
gradle -PskipPrebuildLibraries=true install -Dmaven.repo.local="$PWD/dist/maven" gradle -PuseCommitHashAsVersionName=true -PskipPrebuildLibraries=true install -Dmaven.repo.local="$PWD/dist/maven"
# Zip the natives into a single archive (we are going to use this to deploy native snapshots) # Zip the natives into a single archive (we are going to use this to deploy native snapshots)
echo "Create native zip" echo "Create native zip"

@ -1,7 +1,7 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
group = 'org.jmonkeyengine' group = 'org.jmonkeyengine'
version = jmeVersion + '-' + jmeVersionTag version = jmeFullVersion
sourceCompatibility = '1.6' sourceCompatibility = '1.6'

@ -7,7 +7,7 @@ apply plugin: 'groovy'
apply plugin: 'maven' apply plugin: 'maven'
group = 'org.jmonkeyengine' group = 'org.jmonkeyengine'
version = jmePomVersion version = jmeFullVersion
sourceCompatibility = '1.8' sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
@ -51,9 +51,9 @@ jar {
javadoc { javadoc {
failOnError = false failOnError = false
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.docTitle = "jMonkeyEngine ${jmeMainVersion} ${project.name} Javadoc" options.docTitle = "jMonkeyEngine ${jmeFullVersion} ${project.name} Javadoc"
options.windowTitle = "jMonkeyEngine ${jmeMainVersion} ${project.name} Javadoc" options.windowTitle = "jMonkeyEngine ${jmeFullVersion} ${project.name} Javadoc"
options.header = "<b>jMonkeyEngine ${jmeMainVersion} ${project.name}</b>" options.header = "<b>jMonkeyEngine ${jmeFullVersion} ${project.name}</b>"
options.author = "true" options.author = "true"
options.use = "true" options.use = "true"
options.charSet = "UTF-8" options.charSet = "UTF-8"

@ -1,11 +1,12 @@
# Version number: Major.Minor.Patch (e.g. 3.1.3) # Version number: Major.Minor (e.g. 3.3)
jmeVersion = 3.3.0 jmeVersion = 3.3
# Version for application and settings folder (no spaces!)
jmeMainVersion = 3.3 # Leave empty to autogenerate
# Version label: SNAPSHOT, alpha1, beta1, stable # (use -PjmeVersionName="myVersion" from commandline to specify a custom version name )
jmeVersionTag = SNAPSHOT jmeVersionName =
# Increment this each time jmeVersionTag changes but jmeVersion stays the same
jmeVersionTagID = 6 # If true, the version name will contain the commit hash
useCommitHashAsVersionName = false
# specify if JavaDoc should be built # specify if JavaDoc should be built
buildJavaDoc = true buildJavaDoc = true

@ -18,8 +18,8 @@ ext {
jmeShortGitHash = "" jmeShortGitHash = ""
jmeBuildDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()) jmeBuildDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date())
jmeBranchName = "unknown" jmeBranchName = "unknown"
jmeFullVersion = "${jmeVersion}-UNKNOWN" jmeFullVersion = "${jmeVersion}-SNAPSHOT"
jmePomVersion = "${jmeVersion}-UNKNOWN" jmeVersionTag="SNAPSHOT"
} }
task configureVersionInfo { task configureVersionInfo {
@ -32,19 +32,38 @@ task configureVersionInfo {
jmeBranchName = grgit.branch.current.name jmeBranchName = grgit.branch.current.name
jmeGitTag = grgit.tag.list().find { it.commit == head } jmeGitTag = grgit.tag.list().find { it.commit == head }
if(jmeVersionName==""){
if (jmeGitTag != null) {
if (jmeGitTag != null) { jmeGitTag = jmeGitTag.name
jmeGitTag = jmeGitTag.name jmeFullVersion = jmeGitTag
jmeFullVersion = jmeGitTag jmeVersionTag = ""
jmePomVersion = jmeGitTag } else {
} else if(jmeGitHash!=null&&!jmeGitHash.equals("")){ if(useCommitHashAsVersionName=="true"&&jmeGitHash!=null&&!jmeGitHash.equals("")){
jmeFullVersion = jmeGitHash jmeFullVersion = jmeGitHash
jmePomVersion = jmeGitHash jmeVersionTag = ""
}else{
jmeFullVersion="${jmeVersion}-";
if(jmeBranchName!="master")jmeFullVersion+="${jmeBranchName}-";
jmeFullVersion+="SNAPSHOT"
jmeVersionTag="SNAPSHOT"
}
}
}else{
jmeVersionTag=""
jmeFullVersion=jmeVersionName
} }
logger.warn("Full Version: ${jmeFullVersion}")
logger.warn("POM Version: ${jmePomVersion}") println("Revision: ${jmeRevision}")
println("Hash: ${jmeGitHash}")
println("Short Hash: ${jmeShortGitHash}")
println("Tag: ${jmeGitTag}")
println("Build Date: ${jmeBuildDate}")
println("Build Branch: ${jmeBranchName}")
println("Use commit hash as version ${useCommitHashAsVersionName}")
println("Build Tag: ${jmeVersionTag}")
println("Build Version: ${jmeFullVersion}")
} catch (ex) { } catch (ex) {
// Failed to get repo info // Failed to get repo info
logger.warn("Failed to get repository info: " + ex.message + ". " + \ logger.warn("Failed to get repository info: " + ex.message + ". " + \

Loading…
Cancel
Save