From f38becf2c612ca8c3a27e76bfdf10036aa6ddef1 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 14:24:52 -0500 Subject: [PATCH 01/11] remove SSH based maven publishing The updates.jmonkeyengine.org server is no longer used. --- .travis.yml | 5 ----- common.gradle | 19 ------------------- private/www-updater.key.enc | Bin 3248 -> 0 bytes 3 files changed, 24 deletions(-) delete mode 100644 private/www-updater.key.enc diff --git a/.travis.yml b/.travis.yml index bfb4b6343..1fba35cf3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: java sudo: false -addons: - ssh_known_hosts: updates.jmonkeyengine.org before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock @@ -42,7 +40,6 @@ deploy: 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: # required libs for android build tools @@ -56,5 +53,3 @@ before_install: 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 || :' diff --git a/common.gradle b/common.gradle index a34a40ced..d15f1c582 100644 --- a/common.gradle +++ b/common.gradle @@ -18,16 +18,11 @@ repositories { } } -configurations { - deployerJars -} - dependencies { // Adding dependencies here will add the dependencies to each subproject. testCompile group: 'junit', name: 'junit', version: '4.12' testCompile group: 'org.mockito', name: 'mockito-core', version: '2.0.28-beta' testCompile group: 'org.easytesting', name: 'fest-assert-core', version: '2.0M10' - deployerJars "org.apache.maven.wagon:wagon-ssh:2.9" } jar { @@ -116,17 +111,3 @@ artifacts { 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 - } -} diff --git a/private/www-updater.key.enc b/private/www-updater.key.enc deleted file mode 100644 index b6a2260680a544fea258a868171f52b5a0a36928..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3248 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 From 39dc140f799268caed6f93d71710b7c0b51f30a6 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 14:41:00 -0500 Subject: [PATCH 02/11] build v3.1, master, and PRs only from now on Developers should be using PRs instead of plain branches. --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1fba35cf3..6d7f48dc2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,11 @@ language: java sudo: false +branches: + only: + - master + - v3.1 + before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock From 78ac8df78a8139fd97acc6fa1bb4c24d0acac03f Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 14:44:31 -0500 Subject: [PATCH 03/11] cleanup build cache according to travis docs --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6d7f48dc2..f20f8b288 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,9 @@ branches: 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: directories: - $HOME/.gradle/caches/ From f800d74e8727190a232d2be60149de95b91020a8 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 14:46:21 -0500 Subject: [PATCH 04/11] travis: remove uneeded install directive --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f20f8b288..dc850840a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,9 +23,6 @@ notifications: rooms: secure: "PWEk4+VL986c3gAjWp12nqyifvxCjBqKoESG9d7zWh1uiTLadTHhZJRMdsye36FCpz/c/Jt7zCRO/5y7FaubQptnRrkrRfjp5f99MJRzQVXnUAM+y385qVkXKRKd/PLpM7XPm4AvjvxHCyvzX2wamRvul/TekaXKB9Ti5FCN87s=" -install: - - ./gradlew assemble - script: - ./gradlew check From b99d03bd3cfbf1118146633d0f97b08134fae792 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 14:48:49 -0500 Subject: [PATCH 05/11] version: remove sdk related configuration --- gradle.properties | 3 --- version.gradle | 23 ++++++----------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/gradle.properties b/gradle.properties index 218a7fabe..2a548c3d9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,9 +23,6 @@ bulletUrl = https://storage.googleapis.com/google-code-archive-downloads/v2/code bulletFolder = bullet-2.82-r2704 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_NAME=jMonkeyEngine POM_DESCRIPTION=jMonkeyEngine is a 3D game engine for adventurous Java developers diff --git a/version.gradle b/version.gradle index cd5b6b454..fd6970f8b 100644 --- a/version.gradle +++ b/version.gradle @@ -1,7 +1,7 @@ /* Version Info Examples ===================== - + Nightly Build Snapshot * git tag: * Full Version: 3.1-5124 @@ -22,14 +22,14 @@ * POM Version: 3.1.0-alpha1 * NBM Revision: 0 * NBM UC Suffix: stable/3.1/plugins - + Final Release * git tag: v3.1.0 * Full Version: 3.1 * POM Version: 3.1.0 * NBM Revision: 0 * NBM UC Suffix: stable/3.1/plugins - */ + */ import java.text.SimpleDateFormat import org.ajoberstar.grgit.* @@ -45,7 +45,6 @@ buildscript { ext { jmeRevision = 0 - jmeNbmRevision = 0 jmeGitHash = "" jmeGitTag = "" jmeShortGitHash = "" @@ -53,7 +52,6 @@ ext { jmeBranchName = "unknown" jmeFullVersion = "${jmeVersion}-UNKNOWN" jmePomVersion = "unknown" - jmeNbmUcSuffix = "unknown" } def getReleaseInfo(String tag) { @@ -122,7 +120,7 @@ task configureVersionInfo { jmeShortGitHash = head.abbreviatedId jmeBranchName = grgit.branch.current.name jmeGitTag = grgit.tag.list().find { it.commit == head } - + if (jmeGitTag != null) { jmeGitTag = jmeGitTag.name } else { @@ -133,8 +131,6 @@ task configureVersionInfo { if (releaseInfo != null) { jmeFullVersion = "${releaseInfo.baseVersion}${releaseInfo.releaseSuffix}" jmePomVersion = "${releaseInfo.mainVersion}${releaseInfo.releaseSuffix}" - jmeNbmRevision = "0" - jmeNbmUcSuffix = "stable/${releaseInfo.baseVersion}/plugins" } else { // SNAPSHOT jmeFullVersion = jmeMainVersion @@ -142,27 +138,20 @@ task configureVersionInfo { if (System.env.TRAVIS_BRANCH != null) { 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") { jmeBranchName += "-pr-" + System.env.TRAVIS_PULL_REQUEST } if (jmeBranchName != "v3.1") { jmeFullVersion += "-${jmeBranchName}" jmePomVersion += "-${jmeBranchName}" - jmeNbmUcSuffix = "${jmeBranchName}-" - } else { - jmeNbmUcSuffix = "" } - jmeNbmUcSuffix += "nightly/" + jmeMainVersion + "/plugins" jmeFullVersion += "-${jmeRevision}" jmePomVersion += "-SNAPSHOT" - jmeNbmRevision = jmeRevision } - + logger.warn("Full Version: ${jmeFullVersion}") logger.warn("POM Version: ${jmePomVersion}") - logger.warn("NBM Revision: ${jmeNbmRevision}") - logger.warn("NBM UC Suffix: ${jmeNbmUcSuffix}") } catch (ex) { // Failed to get repo info logger.warn("Failed to get repository info: " + ex.message + ". " + \ From 8ce2f9cfe71b5153213c06202186112e018f6fd8 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 15:08:34 -0500 Subject: [PATCH 06/11] travis: test matrix build --- .travis.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.travis.yml b/.travis.yml index dc850840a..8341235e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,14 @@ branches: - master - v3.1 +matrix: + include: + - jdk: openjdk8 + os: linux + env: UPLOAD_ALL=true + - jdk: openjdk7 + os: linux + - os: osx before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock @@ -16,6 +24,11 @@ cache: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ +before_script: + - 'echo "Tag: $TRAVIS_TAG"' + - 'echo "OS: $TRAVIS_OS_NAME"' + - 'echo "PR: $TRAVIS_PULL_REQUEST"' + notifications: slack: on_success: change From e4ed3313d5caff813e5ffe32ecb16b04bcb68119 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 15:19:39 -0500 Subject: [PATCH 07/11] travis: fix unsupported jdk --- .travis.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8341235e4..1b45c3d3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ branches: matrix: include: - - jdk: openjdk8 + - jdk: oraclejdk8 os: linux env: UPLOAD_ALL=true - jdk: openjdk7 @@ -24,10 +24,6 @@ cache: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ -before_script: - - 'echo "Tag: $TRAVIS_TAG"' - - 'echo "OS: $TRAVIS_OS_NAME"' - - 'echo "PR: $TRAVIS_PULL_REQUEST"' notifications: slack: From 35b9eed76f25769575b7ec7bd83898b44eb04bc5 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 15:25:28 -0500 Subject: [PATCH 08/11] travis: reorder structure a bit --- .travis.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1b45c3d3e..d3eb2e4b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,9 @@ matrix: os: linux - os: osx +before_install: + - git fetch --unshallow + before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ @@ -24,6 +27,11 @@ cache: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ +script: + - ./gradlew check + +after_success: + - '[ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ./gradlew bintrayUpload || :' notifications: slack: @@ -32,9 +40,6 @@ notifications: rooms: secure: "PWEk4+VL986c3gAjWp12nqyifvxCjBqKoESG9d7zWh1uiTLadTHhZJRMdsye36FCpz/c/Jt7zCRO/5y7FaubQptnRrkrRfjp5f99MJRzQVXnUAM+y385qVkXKRKd/PLpM7XPm4AvjvxHCyvzX2wamRvul/TekaXKB9Ti5FCN87s=" -script: - - ./gradlew check - before_deploy: - ./gradlew createZipDistribution - export RELEASE_DIST=$(ls build/distributions/*.zip) @@ -50,8 +55,6 @@ deploy: repo: jMonkeyEngine/jmonkeyengine tags: true -before_install: - - git fetch --unshallow # before_install: # required libs for android build tools @@ -63,5 +66,4 @@ before_install: # 7z x ndk.bin -y > /dev/null # export ANDROID_NDK=`pwd`/android-ndk-r10c -after_success: - - '[ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ./gradlew bintrayUpload || :' + From 06757f73b4e2063aa93ee4bf126092feaaa94ba9 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 15:26:29 -0500 Subject: [PATCH 09/11] travis: upload artifacts only on linux/jdk8 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d3eb2e4b9..8759b8ba6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ script: - ./gradlew check after_success: - - '[ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ./gradlew bintrayUpload || :' + - '[ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ -n "$UPLOAD_ALL" ] && ./gradlew bintrayUpload || :' notifications: slack: From c37f0e59d2183a640c469713907b03f251117d18 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 15:31:15 -0500 Subject: [PATCH 10/11] build: fix gradle 3.2.1 deprecations --- build.gradle | 51 +++++----- jme3-bullet-native-android/build.gradle | 102 ++++++++++---------- jme3-bullet-native/build.gradle | 2 +- jme3-examples/build.gradle | 118 ++++++++++++------------ 4 files changed, 139 insertions(+), 134 deletions(-) diff --git a/build.gradle b/build.gradle index 08a27044b..587b056cb 100644 --- a/build.gradle +++ b/build.gradle @@ -29,31 +29,32 @@ task run(dependsOn: ':jme3-examples:run') { defaultTasks 'run' -task libDist(dependsOn: subprojects.build) << { -// description 'Builds and copies the engine binaries, sources and javadoc to build/libDist' - File libFolder = mkdir("$buildDir/libDist/lib") - File sourceFolder = mkdir("$buildDir/libDist/sources") - File javadocFolder = mkdir("$buildDir/libDist/javadoc") - subprojects.each {project -> - if(project.ext.mainClass == ''){ - project.tasks.withType(Jar).each {archiveTask -> - if(archiveTask.classifier == "sources"){ - copy { - from archiveTask.archivePath - into sourceFolder - rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension} - } - } else if(archiveTask.classifier == "javadoc"){ - copy { - from archiveTask.archivePath - into javadocFolder - rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension} - } - } else{ - copy { - from archiveTask.archivePath - into libFolder - rename {project.name + '.' + archiveTask.extension} +task libDist(dependsOn: subprojects.build, description: 'Builds and copies the engine binaries, sources and javadoc to build/libDist') { + doLast { + File libFolder = mkdir("$buildDir/libDist/lib") + File sourceFolder = mkdir("$buildDir/libDist/sources") + File javadocFolder = mkdir("$buildDir/libDist/javadoc") + subprojects.each {project -> + if(project.ext.mainClass == ''){ + project.tasks.withType(Jar).each {archiveTask -> + if(archiveTask.classifier == "sources"){ + copy { + from archiveTask.archivePath + into sourceFolder + rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension} + } + } else if(archiveTask.classifier == "javadoc"){ + copy { + from archiveTask.archivePath + into javadocFolder + rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension} + } + } else{ + copy { + from archiveTask.archivePath + into libFolder + rename {project.name + '.' + archiveTask.extension} + } } } } diff --git a/jme3-bullet-native-android/build.gradle b/jme3-bullet-native-android/build.gradle index 958d2b094..4d5df83da 100644 --- a/jme3-bullet-native-android/build.gradle +++ b/jme3-bullet-native-android/build.gradle @@ -102,56 +102,58 @@ task copyJmeAndroid(type: Copy, dependsOn:copyJmeCpp) { into outputDir } -task generateNativeHeaders(dependsOn: copyJmeAndroid) << { - String destDirPath = jniPath - String classes = " \ - com.jme3.bullet.PhysicsSpace, \ - \ - com.jme3.bullet.collision.PhysicsCollisionEvent, \ - com.jme3.bullet.collision.PhysicsCollisionObject,\ - com.jme3.bullet.objects.PhysicsCharacter, \ - com.jme3.bullet.objects.PhysicsGhostObject, \ - com.jme3.bullet.objects.PhysicsRigidBody, \ - com.jme3.bullet.objects.PhysicsVehicle, \ - com.jme3.bullet.objects.VehicleWheel, \ - com.jme3.bullet.objects.infos.RigidBodyMotionState, \ - \ - com.jme3.bullet.collision.shapes.CollisionShape, \ - com.jme3.bullet.collision.shapes.BoxCollisionShape, \ - com.jme3.bullet.collision.shapes.CapsuleCollisionShape, \ - com.jme3.bullet.collision.shapes.CompoundCollisionShape, \ - com.jme3.bullet.collision.shapes.ConeCollisionShape, \ - com.jme3.bullet.collision.shapes.CylinderCollisionShape, \ - com.jme3.bullet.collision.shapes.GImpactCollisionShape, \ - com.jme3.bullet.collision.shapes.HeightfieldCollisionShape, \ - com.jme3.bullet.collision.shapes.HullCollisionShape, \ - com.jme3.bullet.collision.shapes.MeshCollisionShape, \ - com.jme3.bullet.collision.shapes.PlaneCollisionShape, \ - com.jme3.bullet.collision.shapes.SimplexCollisionShape, \ - com.jme3.bullet.collision.shapes.SphereCollisionShape, \ - \ - com.jme3.bullet.joints.PhysicsJoint, \ - com.jme3.bullet.joints.ConeJoint, \ - com.jme3.bullet.joints.HingeJoint, \ - com.jme3.bullet.joints.Point2PointJoint, \ - com.jme3.bullet.joints.SixDofJoint, \ - com.jme3.bullet.joints.SixDofSpringJoint, \ - com.jme3.bullet.joints.SliderJoint, \ - com.jme3.bullet.joints.motors.RotationalLimitMotor, \ - com.jme3.bullet.joints.motors.TranslationalLimitMotor, \ - \ - com.jme3.bullet.util.NativeMeshUtil, \ - com.jme3.bullet.util.DebugShapeFactory" - - String projectClassPath = configurations.runtime.asFileTree.matching { - exclude ".gradle" - }.asPath - - exec { - executable org.gradle.internal.jvm.Jvm.current().getExecutable('javah') - args '-d', destDirPath - args '-classpath', projectClassPath - args classes.split(",").collect { it.trim() } +task generateNativeHeaders(dependsOn: copyJmeAndroid) { + doLast { + String destDirPath = jniPath + String classes = " \ + com.jme3.bullet.PhysicsSpace, \ + \ + com.jme3.bullet.collision.PhysicsCollisionEvent, \ + com.jme3.bullet.collision.PhysicsCollisionObject,\ + com.jme3.bullet.objects.PhysicsCharacter, \ + com.jme3.bullet.objects.PhysicsGhostObject, \ + com.jme3.bullet.objects.PhysicsRigidBody, \ + com.jme3.bullet.objects.PhysicsVehicle, \ + com.jme3.bullet.objects.VehicleWheel, \ + com.jme3.bullet.objects.infos.RigidBodyMotionState, \ + \ + com.jme3.bullet.collision.shapes.CollisionShape, \ + com.jme3.bullet.collision.shapes.BoxCollisionShape, \ + com.jme3.bullet.collision.shapes.CapsuleCollisionShape, \ + com.jme3.bullet.collision.shapes.CompoundCollisionShape, \ + com.jme3.bullet.collision.shapes.ConeCollisionShape, \ + com.jme3.bullet.collision.shapes.CylinderCollisionShape, \ + com.jme3.bullet.collision.shapes.GImpactCollisionShape, \ + com.jme3.bullet.collision.shapes.HeightfieldCollisionShape, \ + com.jme3.bullet.collision.shapes.HullCollisionShape, \ + com.jme3.bullet.collision.shapes.MeshCollisionShape, \ + com.jme3.bullet.collision.shapes.PlaneCollisionShape, \ + com.jme3.bullet.collision.shapes.SimplexCollisionShape, \ + com.jme3.bullet.collision.shapes.SphereCollisionShape, \ + \ + com.jme3.bullet.joints.PhysicsJoint, \ + com.jme3.bullet.joints.ConeJoint, \ + com.jme3.bullet.joints.HingeJoint, \ + com.jme3.bullet.joints.Point2PointJoint, \ + com.jme3.bullet.joints.SixDofJoint, \ + com.jme3.bullet.joints.SixDofSpringJoint, \ + com.jme3.bullet.joints.SliderJoint, \ + com.jme3.bullet.joints.motors.RotationalLimitMotor, \ + com.jme3.bullet.joints.motors.TranslationalLimitMotor, \ + \ + com.jme3.bullet.util.NativeMeshUtil, \ + com.jme3.bullet.util.DebugShapeFactory" + + String projectClassPath = configurations.runtime.asFileTree.matching { + exclude ".gradle" + }.asPath + + exec { + executable org.gradle.internal.jvm.Jvm.current().getExecutable('javah') + args '-d', destDirPath + args '-classpath', projectClassPath + args classes.split(",").collect { it.trim() } + } } } diff --git a/jme3-bullet-native/build.gradle b/jme3-bullet-native/build.gradle index f1875647c..97b2afc49 100644 --- a/jme3-bullet-native/build.gradle +++ b/jme3-bullet-native/build.gradle @@ -208,7 +208,7 @@ unzipBullet.dependsOn { } } -task unzipBulletIfNeeded << { +task unzipBulletIfNeeded { } unzipBulletIfNeeded.dependsOn { diff --git a/jme3-examples/build.gradle b/jme3-examples/build.gradle index be2e106a6..7936e33db 100644 --- a/jme3-examples/build.gradle +++ b/jme3-examples/build.gradle @@ -62,69 +62,71 @@ jar.doFirst{ task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar', ':jme3-android:jar', \ ':jme3-android-native:jar', ':jme3-bullet-native-android:jar', \ - ':jme3-bullet-native:jar']) << { - // Copy all dependencies to ../dist/lib, remove versions from jar files - configurations.compile.resolvedConfiguration.resolvedArtifacts.each { artifact -> - copy { - from artifact.file - into '../dist/lib' - if(artifact.classifier != null){ - rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" } - } else{ - rename { "${artifact.name}.${artifact.extension}" } + ':jme3-bullet-native:jar']) { + doLast { + // Copy all dependencies to ../dist/lib, remove versions from jar files + configurations.compile.resolvedConfiguration.resolvedArtifacts.each { artifact -> + copy { + from artifact.file + into '../dist/lib' + if(artifact.classifier != null){ + rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" } + } else{ + rename { "${artifact.name}.${artifact.extension}" } + } } } - } - copy { - from jar.archivePath - into '../dist' - rename { "jMonkeyEngine3.jar" } - } - // Copy JOGL packages, remove version - def config = project(':jme3-jogl').configurations.runtime.copyRecursive({ !(it instanceof ProjectDependency); }) - config.resolvedConfiguration.resolvedArtifacts.each {artifact -> - copy{ - from artifact.file - into '../dist/opt/jogl/lib' - if(artifact.classifier != null){ - rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" } - } else{ - rename { "${artifact.name}.${artifact.extension}" } + copy { + from jar.archivePath + into '../dist' + rename { "jMonkeyEngine3.jar" } + } + // Copy JOGL packages, remove version + def config = project(':jme3-jogl').configurations.runtime.copyRecursive({ !(it instanceof ProjectDependency); }) + config.resolvedConfiguration.resolvedArtifacts.each {artifact -> + copy{ + from artifact.file + into '../dist/opt/jogl/lib' + if(artifact.classifier != null){ + rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" } + } else{ + rename { "${artifact.name}.${artifact.extension}" } + } } } - } - copy { - from project(':jme3-jogl').jar.archivePath - into '../dist/opt/jogl' - rename {project(':jme3-jogl').name+".jar"} - } + copy { + from project(':jme3-jogl').jar.archivePath + into '../dist/opt/jogl' + rename {project(':jme3-jogl').name+".jar"} + } - // Copy bullet packages, remove version - copy { - from project(':jme3-bullet').jar.archivePath - into '../dist/opt/native-bullet' - rename {project(':jme3-bullet').name+".jar"} - } - copy { - from project(':jme3-bullet-native').jar.archivePath - into '../dist/opt/native-bullet' - rename {project(':jme3-bullet-native').name+".jar"} - } + // Copy bullet packages, remove version + copy { + from project(':jme3-bullet').jar.archivePath + into '../dist/opt/native-bullet' + rename {project(':jme3-bullet').name+".jar"} + } + copy { + from project(':jme3-bullet-native').jar.archivePath + into '../dist/opt/native-bullet' + rename {project(':jme3-bullet-native').name+".jar"} + } - // Copy android packages, remove version - copy { - from project(':jme3-android').jar.archivePath - into '../dist/opt/android' - rename {project(':jme3-android').name+".jar"} - } - copy { - from project(':jme3-android-native').jar.archivePath - into '../dist/opt/android' - rename {project(':jme3-android-native').name+".jar"} - } - copy { - from project(':jme3-bullet-native-android').jar.archivePath - into '../dist/opt/native-bullet' - rename {project(':jme3-bullet-native-android').name+".jar"} + // Copy android packages, remove version + copy { + from project(':jme3-android').jar.archivePath + into '../dist/opt/android' + rename {project(':jme3-android').name+".jar"} + } + copy { + from project(':jme3-android-native').jar.archivePath + into '../dist/opt/android' + rename {project(':jme3-android-native').name+".jar"} + } + copy { + from project(':jme3-bullet-native-android').jar.archivePath + into '../dist/opt/native-bullet' + rename {project(':jme3-bullet-native-android').name+".jar"} + } } } From 36e99bf0321af4654fa7b030a7138da0258ff677 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 24 Nov 2016 15:32:56 -0500 Subject: [PATCH 11/11] misc: gitignore update for gradle 3.2.1 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index be1334611..ecb1e1b68 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ *.jnilib *.dylib *.iml +.gradletasknamecache .DS_Store /jme3-core/src/main/resources/com/jme3/system/version.properties /jme3-*/build/