Merge pull request #624 from jMonkeyEngine/revert-573-cleanup_build_scripts
Revert "Cleanup build scripts (3.1)"
This commit is contained in:
commit
8214346e8b
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,7 +14,6 @@
|
|||||||
*.jnilib
|
*.jnilib
|
||||||
*.dylib
|
*.dylib
|
||||||
*.iml
|
*.iml
|
||||||
.gradletasknamecache
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/jme3-core/src/main/resources/com/jme3/system/version.properties
|
/jme3-core/src/main/resources/com/jme3/system/version.properties
|
||||||
/jme3-*/build/
|
/jme3-*/build/
|
||||||
|
43
.travis.yml
43
.travis.yml
@ -1,38 +1,17 @@
|
|||||||
language: java
|
language: java
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
branches:
|
addons:
|
||||||
only:
|
ssh_known_hosts: updates.jmonkeyengine.org
|
||||||
- master
|
|
||||||
- v3.1
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- jdk: oraclejdk8
|
|
||||||
os: linux
|
|
||||||
env: UPLOAD_ALL=true
|
|
||||||
- jdk: openjdk7
|
|
||||||
os: linux
|
|
||||||
- os: osx
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- git fetch --unshallow
|
|
||||||
|
|
||||||
before_cache:
|
before_cache:
|
||||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.gradle/caches/
|
- $HOME/.gradle/caches/
|
||||||
- $HOME/.gradle/wrapper/
|
- $HOME/.gradle/wrapper/
|
||||||
|
|
||||||
script:
|
|
||||||
- ./gradlew check
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- '[ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ -n "$UPLOAD_ALL" ] && ./gradlew bintrayUpload || :'
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
slack:
|
slack:
|
||||||
on_success: change
|
on_success: change
|
||||||
@ -40,6 +19,12 @@ notifications:
|
|||||||
rooms:
|
rooms:
|
||||||
secure: "PWEk4+VL986c3gAjWp12nqyifvxCjBqKoESG9d7zWh1uiTLadTHhZJRMdsye36FCpz/c/Jt7zCRO/5y7FaubQptnRrkrRfjp5f99MJRzQVXnUAM+y385qVkXKRKd/PLpM7XPm4AvjvxHCyvzX2wamRvul/TekaXKB9Ti5FCN87s="
|
secure: "PWEk4+VL986c3gAjWp12nqyifvxCjBqKoESG9d7zWh1uiTLadTHhZJRMdsye36FCpz/c/Jt7zCRO/5y7FaubQptnRrkrRfjp5f99MJRzQVXnUAM+y385qVkXKRKd/PLpM7XPm4AvjvxHCyvzX2wamRvul/TekaXKB9Ti5FCN87s="
|
||||||
|
|
||||||
|
install:
|
||||||
|
- ./gradlew assemble
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ./gradlew check
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- ./gradlew createZipDistribution
|
- ./gradlew createZipDistribution
|
||||||
- export RELEASE_DIST=$(ls build/distributions/*.zip)
|
- export RELEASE_DIST=$(ls build/distributions/*.zip)
|
||||||
@ -55,6 +40,9 @@ deploy:
|
|||||||
repo: jMonkeyEngine/jmonkeyengine
|
repo: jMonkeyEngine/jmonkeyengine
|
||||||
tags: true
|
tags: true
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- git fetch --unshallow
|
||||||
|
- "[ $TRAVIS_PULL_REQUEST == 'false' ] && openssl aes-256-cbc -K $encrypted_a1949b55824a_key -iv $encrypted_a1949b55824a_iv -in private/www-updater.key.enc -out private/www-updater.key -d || :"
|
||||||
|
|
||||||
# before_install:
|
# before_install:
|
||||||
# required libs for android build tools
|
# required libs for android build tools
|
||||||
@ -66,4 +54,7 @@ deploy:
|
|||||||
# 7z x ndk.bin -y > /dev/null
|
# 7z x ndk.bin -y > /dev/null
|
||||||
# export ANDROID_NDK=`pwd`/android-ndk-r10c
|
# export ANDROID_NDK=`pwd`/android-ndk-r10c
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- '[ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ./gradlew bintrayUpload || :'
|
||||||
|
# - '[ "$TRAVIS_BRANCH" == "v3.1" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ./gradlew uploadArchives || :'
|
||||||
|
# - '[ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ./gradlew uploadArchives bintrayUpload || :'
|
||||||
|
51
build.gradle
51
build.gradle
@ -29,32 +29,31 @@ task run(dependsOn: ':jme3-examples:run') {
|
|||||||
|
|
||||||
defaultTasks 'run'
|
defaultTasks 'run'
|
||||||
|
|
||||||
task libDist(dependsOn: subprojects.build, description: 'Builds and copies the engine binaries, sources and javadoc to build/libDist') {
|
task libDist(dependsOn: subprojects.build) << {
|
||||||
doLast {
|
// description 'Builds and copies the engine binaries, sources and javadoc to build/libDist'
|
||||||
File libFolder = mkdir("$buildDir/libDist/lib")
|
File libFolder = mkdir("$buildDir/libDist/lib")
|
||||||
File sourceFolder = mkdir("$buildDir/libDist/sources")
|
File sourceFolder = mkdir("$buildDir/libDist/sources")
|
||||||
File javadocFolder = mkdir("$buildDir/libDist/javadoc")
|
File javadocFolder = mkdir("$buildDir/libDist/javadoc")
|
||||||
subprojects.each {project ->
|
subprojects.each {project ->
|
||||||
if(project.ext.mainClass == ''){
|
if(project.ext.mainClass == ''){
|
||||||
project.tasks.withType(Jar).each {archiveTask ->
|
project.tasks.withType(Jar).each {archiveTask ->
|
||||||
if(archiveTask.classifier == "sources"){
|
if(archiveTask.classifier == "sources"){
|
||||||
copy {
|
copy {
|
||||||
from archiveTask.archivePath
|
from archiveTask.archivePath
|
||||||
into sourceFolder
|
into sourceFolder
|
||||||
rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension}
|
rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension}
|
||||||
}
|
}
|
||||||
} else if(archiveTask.classifier == "javadoc"){
|
} else if(archiveTask.classifier == "javadoc"){
|
||||||
copy {
|
copy {
|
||||||
from archiveTask.archivePath
|
from archiveTask.archivePath
|
||||||
into javadocFolder
|
into javadocFolder
|
||||||
rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension}
|
rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension}
|
||||||
}
|
}
|
||||||
} else{
|
} else{
|
||||||
copy {
|
copy {
|
||||||
from archiveTask.archivePath
|
from archiveTask.archivePath
|
||||||
into libFolder
|
into libFolder
|
||||||
rename {project.name + '.' + archiveTask.extension}
|
rename {project.name + '.' + archiveTask.extension}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,11 +18,16 @@ repositories {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
deployerJars
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Adding dependencies here will add the dependencies to each subproject.
|
// Adding dependencies here will add the dependencies to each subproject.
|
||||||
testCompile group: 'junit', name: 'junit', version: '4.12'
|
testCompile group: 'junit', name: 'junit', version: '4.12'
|
||||||
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.0.28-beta'
|
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.0.28-beta'
|
||||||
testCompile group: 'org.easytesting', name: 'fest-assert-core', version: '2.0M10'
|
testCompile group: 'org.easytesting', name: 'fest-assert-core', version: '2.0M10'
|
||||||
|
deployerJars "org.apache.maven.wagon:wagon-ssh:2.9"
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
@ -111,3 +116,17 @@ artifacts {
|
|||||||
archives writeFullPom.outputs.files[0]
|
archives writeFullPom.outputs.files[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uploadArchives {
|
||||||
|
repositories.mavenDeployer {
|
||||||
|
configuration = configurations.deployerJars
|
||||||
|
|
||||||
|
// disable this otherwise it will fill up the server with stale jars
|
||||||
|
uniqueVersion = false
|
||||||
|
|
||||||
|
repository(url: "scp://updates.jmonkeyengine.org/var/www/updates/maven") {
|
||||||
|
authentication(userName: "www-updater", privateKey: "private/www-updater.key")
|
||||||
|
}
|
||||||
|
|
||||||
|
pom.project pomConfig
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -23,6 +23,9 @@ bulletUrl = https://storage.googleapis.com/google-code-archive-downloads/v2/code
|
|||||||
bulletFolder = bullet-2.82-r2704
|
bulletFolder = bullet-2.82-r2704
|
||||||
bulletZipFile = bullet.zip
|
bulletZipFile = bullet.zip
|
||||||
|
|
||||||
|
# Path for downloading NetBeans Base
|
||||||
|
netbeansUrl = http://download.netbeans.org/netbeans/8.0.2/final/zip/netbeans-8.0.2-201411181905-javase.zip
|
||||||
|
|
||||||
# POM settings
|
# POM settings
|
||||||
POM_NAME=jMonkeyEngine
|
POM_NAME=jMonkeyEngine
|
||||||
POM_DESCRIPTION=jMonkeyEngine is a 3D game engine for adventurous Java developers
|
POM_DESCRIPTION=jMonkeyEngine is a 3D game engine for adventurous Java developers
|
||||||
|
@ -102,58 +102,56 @@ task copyJmeAndroid(type: Copy, dependsOn:copyJmeCpp) {
|
|||||||
into outputDir
|
into outputDir
|
||||||
}
|
}
|
||||||
|
|
||||||
task generateNativeHeaders(dependsOn: copyJmeAndroid) {
|
task generateNativeHeaders(dependsOn: copyJmeAndroid) << {
|
||||||
doLast {
|
String destDirPath = jniPath
|
||||||
String destDirPath = jniPath
|
String classes = " \
|
||||||
String classes = " \
|
com.jme3.bullet.PhysicsSpace, \
|
||||||
com.jme3.bullet.PhysicsSpace, \
|
\
|
||||||
\
|
com.jme3.bullet.collision.PhysicsCollisionEvent, \
|
||||||
com.jme3.bullet.collision.PhysicsCollisionEvent, \
|
com.jme3.bullet.collision.PhysicsCollisionObject,\
|
||||||
com.jme3.bullet.collision.PhysicsCollisionObject,\
|
com.jme3.bullet.objects.PhysicsCharacter, \
|
||||||
com.jme3.bullet.objects.PhysicsCharacter, \
|
com.jme3.bullet.objects.PhysicsGhostObject, \
|
||||||
com.jme3.bullet.objects.PhysicsGhostObject, \
|
com.jme3.bullet.objects.PhysicsRigidBody, \
|
||||||
com.jme3.bullet.objects.PhysicsRigidBody, \
|
com.jme3.bullet.objects.PhysicsVehicle, \
|
||||||
com.jme3.bullet.objects.PhysicsVehicle, \
|
com.jme3.bullet.objects.VehicleWheel, \
|
||||||
com.jme3.bullet.objects.VehicleWheel, \
|
com.jme3.bullet.objects.infos.RigidBodyMotionState, \
|
||||||
com.jme3.bullet.objects.infos.RigidBodyMotionState, \
|
\
|
||||||
\
|
com.jme3.bullet.collision.shapes.CollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.CollisionShape, \
|
com.jme3.bullet.collision.shapes.BoxCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.BoxCollisionShape, \
|
com.jme3.bullet.collision.shapes.CapsuleCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.CapsuleCollisionShape, \
|
com.jme3.bullet.collision.shapes.CompoundCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.CompoundCollisionShape, \
|
com.jme3.bullet.collision.shapes.ConeCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.ConeCollisionShape, \
|
com.jme3.bullet.collision.shapes.CylinderCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.CylinderCollisionShape, \
|
com.jme3.bullet.collision.shapes.GImpactCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.GImpactCollisionShape, \
|
com.jme3.bullet.collision.shapes.HeightfieldCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.HeightfieldCollisionShape, \
|
com.jme3.bullet.collision.shapes.HullCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.HullCollisionShape, \
|
com.jme3.bullet.collision.shapes.MeshCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.MeshCollisionShape, \
|
com.jme3.bullet.collision.shapes.PlaneCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.PlaneCollisionShape, \
|
com.jme3.bullet.collision.shapes.SimplexCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.SimplexCollisionShape, \
|
com.jme3.bullet.collision.shapes.SphereCollisionShape, \
|
||||||
com.jme3.bullet.collision.shapes.SphereCollisionShape, \
|
\
|
||||||
\
|
com.jme3.bullet.joints.PhysicsJoint, \
|
||||||
com.jme3.bullet.joints.PhysicsJoint, \
|
com.jme3.bullet.joints.ConeJoint, \
|
||||||
com.jme3.bullet.joints.ConeJoint, \
|
com.jme3.bullet.joints.HingeJoint, \
|
||||||
com.jme3.bullet.joints.HingeJoint, \
|
com.jme3.bullet.joints.Point2PointJoint, \
|
||||||
com.jme3.bullet.joints.Point2PointJoint, \
|
com.jme3.bullet.joints.SixDofJoint, \
|
||||||
com.jme3.bullet.joints.SixDofJoint, \
|
com.jme3.bullet.joints.SixDofSpringJoint, \
|
||||||
com.jme3.bullet.joints.SixDofSpringJoint, \
|
com.jme3.bullet.joints.SliderJoint, \
|
||||||
com.jme3.bullet.joints.SliderJoint, \
|
com.jme3.bullet.joints.motors.RotationalLimitMotor, \
|
||||||
com.jme3.bullet.joints.motors.RotationalLimitMotor, \
|
com.jme3.bullet.joints.motors.TranslationalLimitMotor, \
|
||||||
com.jme3.bullet.joints.motors.TranslationalLimitMotor, \
|
\
|
||||||
\
|
com.jme3.bullet.util.NativeMeshUtil, \
|
||||||
com.jme3.bullet.util.NativeMeshUtil, \
|
com.jme3.bullet.util.DebugShapeFactory"
|
||||||
com.jme3.bullet.util.DebugShapeFactory"
|
|
||||||
|
|
||||||
String projectClassPath = configurations.runtime.asFileTree.matching {
|
String projectClassPath = configurations.runtime.asFileTree.matching {
|
||||||
exclude ".gradle"
|
exclude ".gradle"
|
||||||
}.asPath
|
}.asPath
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
executable org.gradle.internal.jvm.Jvm.current().getExecutable('javah')
|
executable org.gradle.internal.jvm.Jvm.current().getExecutable('javah')
|
||||||
args '-d', destDirPath
|
args '-d', destDirPath
|
||||||
args '-classpath', projectClassPath
|
args '-classpath', projectClassPath
|
||||||
args classes.split(",").collect { it.trim() }
|
args classes.split(",").collect { it.trim() }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ unzipBullet.dependsOn {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task unzipBulletIfNeeded {
|
task unzipBulletIfNeeded << {
|
||||||
}
|
}
|
||||||
|
|
||||||
unzipBulletIfNeeded.dependsOn {
|
unzipBulletIfNeeded.dependsOn {
|
||||||
|
@ -62,71 +62,69 @@ jar.doFirst{
|
|||||||
|
|
||||||
task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar', ':jme3-android:jar', \
|
task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar', ':jme3-android:jar', \
|
||||||
':jme3-android-native:jar', ':jme3-bullet-native-android:jar', \
|
':jme3-android-native:jar', ':jme3-bullet-native-android:jar', \
|
||||||
':jme3-bullet-native:jar']) {
|
':jme3-bullet-native:jar']) << {
|
||||||
doLast {
|
// Copy all dependencies to ../dist/lib, remove versions from jar files
|
||||||
// Copy all dependencies to ../dist/lib, remove versions from jar files
|
configurations.compile.resolvedConfiguration.resolvedArtifacts.each { artifact ->
|
||||||
configurations.compile.resolvedConfiguration.resolvedArtifacts.each { artifact ->
|
copy {
|
||||||
copy {
|
from artifact.file
|
||||||
from artifact.file
|
into '../dist/lib'
|
||||||
into '../dist/lib'
|
if(artifact.classifier != null){
|
||||||
if(artifact.classifier != null){
|
rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" }
|
||||||
rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" }
|
} else{
|
||||||
} else{
|
rename { "${artifact.name}.${artifact.extension}" }
|
||||||
rename { "${artifact.name}.${artifact.extension}" }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
copy {
|
}
|
||||||
from jar.archivePath
|
copy {
|
||||||
into '../dist'
|
from jar.archivePath
|
||||||
rename { "jMonkeyEngine3.jar" }
|
into '../dist'
|
||||||
}
|
rename { "jMonkeyEngine3.jar" }
|
||||||
// Copy JOGL packages, remove version
|
}
|
||||||
def config = project(':jme3-jogl').configurations.runtime.copyRecursive({ !(it instanceof ProjectDependency); })
|
// Copy JOGL packages, remove version
|
||||||
config.resolvedConfiguration.resolvedArtifacts.each {artifact ->
|
def config = project(':jme3-jogl').configurations.runtime.copyRecursive({ !(it instanceof ProjectDependency); })
|
||||||
copy{
|
config.resolvedConfiguration.resolvedArtifacts.each {artifact ->
|
||||||
from artifact.file
|
copy{
|
||||||
into '../dist/opt/jogl/lib'
|
from artifact.file
|
||||||
if(artifact.classifier != null){
|
into '../dist/opt/jogl/lib'
|
||||||
rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" }
|
if(artifact.classifier != null){
|
||||||
} else{
|
rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" }
|
||||||
rename { "${artifact.name}.${artifact.extension}" }
|
} else{
|
||||||
}
|
rename { "${artifact.name}.${artifact.extension}" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
copy {
|
}
|
||||||
from project(':jme3-jogl').jar.archivePath
|
copy {
|
||||||
into '../dist/opt/jogl'
|
from project(':jme3-jogl').jar.archivePath
|
||||||
rename {project(':jme3-jogl').name+".jar"}
|
into '../dist/opt/jogl'
|
||||||
}
|
rename {project(':jme3-jogl').name+".jar"}
|
||||||
|
}
|
||||||
// Copy bullet packages, remove version
|
|
||||||
copy {
|
// Copy bullet packages, remove version
|
||||||
from project(':jme3-bullet').jar.archivePath
|
copy {
|
||||||
into '../dist/opt/native-bullet'
|
from project(':jme3-bullet').jar.archivePath
|
||||||
rename {project(':jme3-bullet').name+".jar"}
|
into '../dist/opt/native-bullet'
|
||||||
}
|
rename {project(':jme3-bullet').name+".jar"}
|
||||||
copy {
|
}
|
||||||
from project(':jme3-bullet-native').jar.archivePath
|
copy {
|
||||||
into '../dist/opt/native-bullet'
|
from project(':jme3-bullet-native').jar.archivePath
|
||||||
rename {project(':jme3-bullet-native').name+".jar"}
|
into '../dist/opt/native-bullet'
|
||||||
}
|
rename {project(':jme3-bullet-native').name+".jar"}
|
||||||
|
}
|
||||||
// Copy android packages, remove version
|
|
||||||
copy {
|
// Copy android packages, remove version
|
||||||
from project(':jme3-android').jar.archivePath
|
copy {
|
||||||
into '../dist/opt/android'
|
from project(':jme3-android').jar.archivePath
|
||||||
rename {project(':jme3-android').name+".jar"}
|
into '../dist/opt/android'
|
||||||
}
|
rename {project(':jme3-android').name+".jar"}
|
||||||
copy {
|
}
|
||||||
from project(':jme3-android-native').jar.archivePath
|
copy {
|
||||||
into '../dist/opt/android'
|
from project(':jme3-android-native').jar.archivePath
|
||||||
rename {project(':jme3-android-native').name+".jar"}
|
into '../dist/opt/android'
|
||||||
}
|
rename {project(':jme3-android-native').name+".jar"}
|
||||||
copy {
|
}
|
||||||
from project(':jme3-bullet-native-android').jar.archivePath
|
copy {
|
||||||
into '../dist/opt/native-bullet'
|
from project(':jme3-bullet-native-android').jar.archivePath
|
||||||
rename {project(':jme3-bullet-native-android').name+".jar"}
|
into '../dist/opt/native-bullet'
|
||||||
}
|
rename {project(':jme3-bullet-native-android').name+".jar"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
private/www-updater.key.enc
Normal file
BIN
private/www-updater.key.enc
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
Version Info Examples
|
Version Info Examples
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Nightly Build Snapshot
|
Nightly Build Snapshot
|
||||||
* git tag:
|
* git tag:
|
||||||
* Full Version: 3.1-5124
|
* Full Version: 3.1-5124
|
||||||
@ -22,14 +22,14 @@
|
|||||||
* POM Version: 3.1.0-alpha1
|
* POM Version: 3.1.0-alpha1
|
||||||
* NBM Revision: 0
|
* NBM Revision: 0
|
||||||
* NBM UC Suffix: stable/3.1/plugins
|
* NBM UC Suffix: stable/3.1/plugins
|
||||||
|
|
||||||
Final Release
|
Final Release
|
||||||
* git tag: v3.1.0
|
* git tag: v3.1.0
|
||||||
* Full Version: 3.1
|
* Full Version: 3.1
|
||||||
* POM Version: 3.1.0
|
* POM Version: 3.1.0
|
||||||
* NBM Revision: 0
|
* NBM Revision: 0
|
||||||
* NBM UC Suffix: stable/3.1/plugins
|
* NBM UC Suffix: stable/3.1/plugins
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import org.ajoberstar.grgit.*
|
import org.ajoberstar.grgit.*
|
||||||
@ -45,6 +45,7 @@ buildscript {
|
|||||||
|
|
||||||
ext {
|
ext {
|
||||||
jmeRevision = 0
|
jmeRevision = 0
|
||||||
|
jmeNbmRevision = 0
|
||||||
jmeGitHash = ""
|
jmeGitHash = ""
|
||||||
jmeGitTag = ""
|
jmeGitTag = ""
|
||||||
jmeShortGitHash = ""
|
jmeShortGitHash = ""
|
||||||
@ -52,6 +53,7 @@ ext {
|
|||||||
jmeBranchName = "unknown"
|
jmeBranchName = "unknown"
|
||||||
jmeFullVersion = "${jmeVersion}-UNKNOWN"
|
jmeFullVersion = "${jmeVersion}-UNKNOWN"
|
||||||
jmePomVersion = "unknown"
|
jmePomVersion = "unknown"
|
||||||
|
jmeNbmUcSuffix = "unknown"
|
||||||
}
|
}
|
||||||
|
|
||||||
def getReleaseInfo(String tag) {
|
def getReleaseInfo(String tag) {
|
||||||
@ -120,7 +122,7 @@ task configureVersionInfo {
|
|||||||
jmeShortGitHash = head.abbreviatedId
|
jmeShortGitHash = head.abbreviatedId
|
||||||
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 (jmeGitTag != null) {
|
if (jmeGitTag != null) {
|
||||||
jmeGitTag = jmeGitTag.name
|
jmeGitTag = jmeGitTag.name
|
||||||
} else {
|
} else {
|
||||||
@ -131,6 +133,8 @@ task configureVersionInfo {
|
|||||||
if (releaseInfo != null) {
|
if (releaseInfo != null) {
|
||||||
jmeFullVersion = "${releaseInfo.baseVersion}${releaseInfo.releaseSuffix}"
|
jmeFullVersion = "${releaseInfo.baseVersion}${releaseInfo.releaseSuffix}"
|
||||||
jmePomVersion = "${releaseInfo.mainVersion}${releaseInfo.releaseSuffix}"
|
jmePomVersion = "${releaseInfo.mainVersion}${releaseInfo.releaseSuffix}"
|
||||||
|
jmeNbmRevision = "0"
|
||||||
|
jmeNbmUcSuffix = "stable/${releaseInfo.baseVersion}/plugins"
|
||||||
} else {
|
} else {
|
||||||
// SNAPSHOT
|
// SNAPSHOT
|
||||||
jmeFullVersion = jmeMainVersion
|
jmeFullVersion = jmeMainVersion
|
||||||
@ -138,20 +142,27 @@ task configureVersionInfo {
|
|||||||
if (System.env.TRAVIS_BRANCH != null) {
|
if (System.env.TRAVIS_BRANCH != null) {
|
||||||
jmeBranchName = System.env.TRAVIS_BRANCH
|
jmeBranchName = System.env.TRAVIS_BRANCH
|
||||||
}
|
}
|
||||||
if (System.env.TRAVIS_PULL_REQUEST != null &&
|
if (System.env.TRAVIS_PULL_REQUEST != null &&
|
||||||
System.env.TRAVIS_PULL_REQUEST != "false") {
|
System.env.TRAVIS_PULL_REQUEST != "false") {
|
||||||
jmeBranchName += "-pr-" + System.env.TRAVIS_PULL_REQUEST
|
jmeBranchName += "-pr-" + System.env.TRAVIS_PULL_REQUEST
|
||||||
}
|
}
|
||||||
if (jmeBranchName != "v3.1") {
|
if (jmeBranchName != "v3.1") {
|
||||||
jmeFullVersion += "-${jmeBranchName}"
|
jmeFullVersion += "-${jmeBranchName}"
|
||||||
jmePomVersion += "-${jmeBranchName}"
|
jmePomVersion += "-${jmeBranchName}"
|
||||||
|
jmeNbmUcSuffix = "${jmeBranchName}-"
|
||||||
|
} else {
|
||||||
|
jmeNbmUcSuffix = ""
|
||||||
}
|
}
|
||||||
|
jmeNbmUcSuffix += "nightly/" + jmeMainVersion + "/plugins"
|
||||||
jmeFullVersion += "-${jmeRevision}"
|
jmeFullVersion += "-${jmeRevision}"
|
||||||
jmePomVersion += "-SNAPSHOT"
|
jmePomVersion += "-SNAPSHOT"
|
||||||
|
jmeNbmRevision = jmeRevision
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.warn("Full Version: ${jmeFullVersion}")
|
logger.warn("Full Version: ${jmeFullVersion}")
|
||||||
logger.warn("POM Version: ${jmePomVersion}")
|
logger.warn("POM Version: ${jmePomVersion}")
|
||||||
|
logger.warn("NBM Revision: ${jmeNbmRevision}")
|
||||||
|
logger.warn("NBM UC Suffix: ${jmeNbmUcSuffix}")
|
||||||
} 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…
x
Reference in New Issue
Block a user