My entire use of Packr has been a lie - it needs a JDK corresponding to the destination platform
This commit is contained in:
parent
405536beba
commit
f27611710d
2 changed files with 17 additions and 3 deletions
10
.travis.yml
10
.travis.yml
|
@ -1,6 +1,7 @@
|
|||
language: android
|
||||
dist: trusty # For oracleJDK fail errors, as per advice from https://travis-ci.community/t/error-installing-oraclejdk8-expected-feature-release-number-in-range-of-9-to-14-but-got-8/3766/6
|
||||
|
||||
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
|
||||
|
@ -24,7 +25,13 @@ cache:
|
|||
|
||||
script:
|
||||
- "./gradlew test"
|
||||
- if [ -n "$TRAVIS_TAG" ]; then ./gradlew desktop:packr; fi
|
||||
- if [ -n "$TRAVIS_TAG" ]; then
|
||||
curl https://github.com/ojdkbuild/ojdkbuild/releases/download/java-1.8.0-openjdk-1.8.0.232-1.b09/java-1.8.0-openjdk-1.8.0.232-1.b09.ojdkbuild.windows.x86_64.zip -o jdk-windows.zip
|
||||
./gradlew desktop:packrLinux32;
|
||||
./gradlew desktop:packrLinux64;
|
||||
./gradlew desktop:packrWindows32;
|
||||
./gradlew desktop:packrWindows64;
|
||||
fi
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
|
@ -38,7 +45,6 @@ deploy:
|
|||
- deploy/Unciv-Linux64.zip
|
||||
- deploy/Unciv-Windows32.zip
|
||||
- deploy/Unciv-Windows64.zip
|
||||
- deploy/Unciv-MacOS.zip
|
||||
on:
|
||||
repo: yairm210/Unciv
|
||||
tags: true
|
||||
|
|
|
@ -49,7 +49,15 @@ for(platform in PackrConfig.Platform.values()) {
|
|||
def jarFile = "desktop/build/libs/${appName}.jar".toString()
|
||||
PackrConfig config = new PackrConfig()
|
||||
config.platform = platform
|
||||
config.jdk = System.env.'JAVA_HOME' // For Travis
|
||||
|
||||
// For Travis
|
||||
if(platform == PackrConfig.Platform.Linux32 || platform == PackrConfig.Platform.Linux64)
|
||||
config.jdk = System.env.'JAVA_HOME' // take the jdk straight from the building linux computer
|
||||
|
||||
if(platform == PackrConfig.Platform.Windows32 || platform == PackrConfig.Platform.Windows64)
|
||||
config.jdk = "jdk-windows.zip" // see how we download and name this in travis yml
|
||||
|
||||
// for my computer
|
||||
// config.jdk = "C:/Users/LENOVO/Downloads/java-1.8.0-openjdk-1.8.0.232-1.b09.ojdkbuild.windows.x86_64.zip"
|
||||
config.executable = "Unciv"
|
||||
config.classpath = Arrays.asList(jarFile)
|
||||
|
|
Loading…
Reference in a new issue