Merge pull request #2089 from iBotPeaches/issue-2086

build: test on jdk9 and jdk11
This commit is contained in:
Connor Tumbleson 2019-07-13 11:34:04 -04:00 committed by GitHub
commit acb0ee096f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 8 deletions

View File

@ -13,6 +13,8 @@ matrix:
jdk: openjdk8
- os: linux
jdk: oraclejdk8
- os: linux
jdk: oraclejdk11
- os: osx
osx_image: xcode9.2
- os: windows

View File

@ -37,13 +37,24 @@ jar {
}
task cleanOutputDirectory(type: Delete) {
delete fileTree(dir: jar.destinationDir.getPath(), exclude: "apktool-cli-all.jar")
delete fileTree(dir: jar.getDestinationDirectory().getAsFile(), exclude: "apktool-cli-all.jar")
}
task proguard(type: proguard.gradle.ProGuardTask, dependsOn: shadowJar) {
injars shadowJar.archivePath
injars shadowJar.getArchiveFile()
libraryjars "${System.properties['java.home']}/lib/rt.jar"
// Java 9 and prior uses merged package for runtime, later uses split jmod files.
if (JavaVersion.current() <= JavaVersion.VERSION_1_8) {
libraryjars "${System.properties['java.home']}/lib/rt.jar"
} else {
libraryjars "${System.properties['java.home']}/jmods/java.base.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
libraryjars "${System.properties['java.home']}/jmods/java.logging.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
libraryjars "${System.properties['java.home']}/jmods/java.xml.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
libraryjars "${System.properties['java.home']}/jmods/java.desktop.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
libraryjars "${System.properties['java.home']}/jmods/java.sql.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
libraryjars "${System.properties['java.home']}/jmods/jdk.unsupported.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
}
dontobfuscate
dontoptimize
@ -56,7 +67,9 @@ task proguard(type: proguard.gradle.ProGuardTask, dependsOn: shadowJar) {
dontwarn 'javax.xml.xpath.**'
dontnote '**'
def outFile = jar.destinationDir.getPath() + '/' + "apktool" + '-' + project.apktool_version + '-small' + '.' + jar.extension
def outPath = jar.getDestinationDirectory().getAsFile().get().toString()
def extension = jar.archiveExtension.get().toString()
def outFile = outPath + '/' + "apktool" + '-' + project.apktool_version + '-small' + '.' + extension
outjars outFile
}

View File

@ -21,7 +21,7 @@ buildscript {
options.encoding = "UTF-8"
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.0.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
}
}
@ -113,7 +113,7 @@ subprojects {
commons_lang: 'org.apache.commons:commons-lang3:3.1',
guava: 'com.google.guava:guava:14.0',
junit: 'junit:junit:4.12',
proguard_gradle: 'net.sf.proguard:proguard-gradle:6.1.0',
proguard_gradle: 'net.sf.proguard:proguard-gradle:6.1.1',
snakeyaml: 'org.yaml:snakeyaml:1.18:android',
smali: 'org.smali:smali:2.2.7',
xmlpull: 'xpp3:xpp3:1.1.4c',

View File

@ -1,6 +1,6 @@
#!/usr/bin/env sh
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
if [ "$TRAVIS_OS_NAME" = "windows" ]; then
export GRADLE_OPTS=-Dorg.gradle.daemon=false
choco install jdk8
export PATH=$PATH:"/c/Program Files/Java/jdk1.8.0_211/bin"

View File

@ -1,6 +1,6 @@
#!/usr/bin/env sh
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
if [ "$TRAVIS_OS_NAME" = "windows" ]; then
export GRADLE_OPTS=-Dorg.gradle.daemon=false
export PATH=$PATH:"/c/Program Files/Java/jdk1.8.0_211/bin"
export JAVA_HOME="/c/Program Files/Java/jdk1.8.0_211"