From cfea3e08319715b6e82c18fc51dbceb4dfb7a13b Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Wed, 9 Jan 2019 11:45:54 -0500 Subject: [PATCH] build: initial attempt at getting travis windows support build: force windows onto the bash environment build: update permission (+x) of clean-test file build: "bat" instead of "exe" extension build: attempt to support long-path names on windows build: another attempt at long filepaths on windows build: force +x on scripts prior to execution build: exit with return code of last command build: dump out current path build: dump out current path - part 2 fix: remove 5 chars from path to drop down from 260 windows max path build: correct gradlew.bat path and remove unneeded lines fix: remove long path global configuration fix: restore PATH setting for windows env build: PATH resets between scripts, fix for windows --- .travis.yml | 29 ++++++++++++------- .../androlib/aapt1/BuildAndDecodeTest.java | 2 +- .../strings.xml | 0 scripts/travis-ci/clean-tests.sh | 11 +++++++ scripts/travis-ci/run-tests.sh | 10 ++++++- 5 files changed, 39 insertions(+), 13 deletions(-) rename brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/res/{values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp-xlarge-long-round-highdr-land-desk-night-xhdpi-finger-keyssoft-12key-navhidden-dpad-v26 => values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp-long-round-highdr-land-desk-night-xhdpi-finger-keyssoft-12key-navhidden-dpad-v26}/strings.xml (100%) create mode 100755 scripts/travis-ci/clean-tests.sh diff --git a/.travis.yml b/.travis.yml index b7dad9c3..64fca344 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,28 +1,35 @@ env: - - TERM=dumb GROOVY_TURN_OFF_JAVA_WARNINGS=true + global: + - TERM=dumb + - GROOVY_TURN_OFF_JAVA_WARNINGS=true + language: java + dist: trusty + matrix: include: - os: linux jdk: openjdk8 -# - os: linux -# jdk: openjdk9 - os: linux jdk: oraclejdk8 -# - os: linux -# jdk: oraclejdk9 - os: osx osx_image: xcode9.2 -# - os: osx -# osx_image: xcode9.4 + - os: windows + language: bash cache: directories: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ -install: ./gradlew clean -script: ./gradlew build shadowJar proguard + +install: + - chmod +x ./scripts/travis-ci/clean-tests.sh + - ./scripts/travis-ci/clean-tests.sh + +script: + - chmod +x ./scripts/travis-ci/run-tests.sh + - ./scripts/travis-ci/run-tests.sh + branches: only: - - master - - stable + - master \ No newline at end of file diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java index ee9db151..7dc82d5c 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java @@ -241,7 +241,7 @@ public class BuildAndDecodeTest extends BaseTest { @Test public void qualifiersTest() throws BrutException { compareValuesFiles("values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp" - + "-xlarge-long-round-highdr-land-desk-night-xhdpi-finger-keyssoft-12key" + + "-long-round-highdr-land-desk-night-xhdpi-finger-keyssoft-12key" + "-navhidden-dpad-v26/strings.xml"); } diff --git a/brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/res/values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp-xlarge-long-round-highdr-land-desk-night-xhdpi-finger-keyssoft-12key-navhidden-dpad-v26/strings.xml b/brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/res/values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp-long-round-highdr-land-desk-night-xhdpi-finger-keyssoft-12key-navhidden-dpad-v26/strings.xml similarity index 100% rename from brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/res/values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp-xlarge-long-round-highdr-land-desk-night-xhdpi-finger-keyssoft-12key-navhidden-dpad-v26/strings.xml rename to brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/res/values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp-long-round-highdr-land-desk-night-xhdpi-finger-keyssoft-12key-navhidden-dpad-v26/strings.xml diff --git a/scripts/travis-ci/clean-tests.sh b/scripts/travis-ci/clean-tests.sh new file mode 100755 index 00000000..a65e49e6 --- /dev/null +++ b/scripts/travis-ci/clean-tests.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then + choco install jdk8 + export PATH=$PATH:"/c/Program Files/Java/jdk1.8.0_191/bin" + ./gradlew.bat clean +else + ./gradlew clean +fi + +exit $? \ No newline at end of file diff --git a/scripts/travis-ci/run-tests.sh b/scripts/travis-ci/run-tests.sh index 563869ce..3938c661 100755 --- a/scripts/travis-ci/run-tests.sh +++ b/scripts/travis-ci/run-tests.sh @@ -1,2 +1,10 @@ #!/usr/bin/env sh -./gradlew build shadowJar + +if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then + export PATH=$PATH:"/c/Program Files/Java/jdk1.8.0_191/bin" + ./gradlew.bat build shadowJar proguard +else + ./gradlew build shadowJar proguard +fi + +exit $? \ No newline at end of file