2
0
Эх сурвалжийг харах

Fixes #76 - The Platform Independent Release won't have the bundled jdk in it's settings since it's only bundled with the installers. Note: Slow method, improvements would be nice

MeFisto94 9 жил өмнө
parent
commit
5acbb89f69
2 өөрчлөгдсөн 25 нэмэгдсэн , 0 устгасан
  1. 1 0
      .travis.yml
  2. 24 0
      build.gradle

+ 1 - 0
.travis.yml

@@ -50,6 +50,7 @@ before_deploy:
   
   # Has to be done before deploy (due to the rm command)
   #- scp -rp -i nbproject/private/www-updater.key build/updates/* [email protected]:/var/www/updates/stable/3.1/plugins
+  - ./gradlew fixPlatformIndependent
   - rm -rf build/
 
 deploy:

+ 24 - 0
build.gradle

@@ -561,6 +561,30 @@ task cleanSdk() <<{
     file("JME3TestsTemplateAndroid/src/jme3test/").deleteDir()
 }
 
+task patchPlatformIndependent(type: Copy) {
+    from zipTree('dist/jmonkeyplatform.zip')
+    into "dist/temp/"
+
+    filter { String line ->
+        line.startsWith('#jdkhome=') ? '#jdkhome="/path/to/jdk"': line
+    }
+
+    doLast {
+        delete(file('dist/jmonkeyplatform.zip'))
+    }
+}
+
+task fixPlatformIndependent(dependsOn: patchPlatformIndependent, type: Zip) {
+    description = "We compile our installers with the bundled jdk, but the platform independent zip doesn't have the jdk. For this we need to change the jmonkeyplatform.zip after building the installers to not have a jdk bundled"
+
+    from 'dist/temp'
+    archiveName = 'jmonkeyplatform.zip'
+    destinationDir = file('dist')
+
+    doLast {
+        delete("dist/temp")
+    }
+}
 
 //jar.dependsOn(buildSdk)
 //clean.dependsOn(cleanSdk)