Merge branch 'master' into master

This commit is contained in:
Connor Tumbleson 2019-07-13 11:46:16 -04:00 committed by GitHub
commit 7619fbcdbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 28 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()
// 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

@ -28,6 +28,7 @@ public final class ResTypeSpec {
public static final String RES_TYPE_NAME_ARRAY = "array";
public static final String RES_TYPE_NAME_PLURALS = "plurals";
public static final String RES_TYPE_NAME_STYLES = "style";
public static final String RES_TYPE_NAME_ATTR = "attr";
private final String mName;
private final Map<String, ResResSpec> mResSpecs = new LinkedHashMap<String, ResResSpec>();

View File

@ -112,6 +112,10 @@ public class ResValueFactory {
return new ResStyleValue(parentVal, items, this);
}
if (ResTypeSpec.RES_TYPE_NAME_ATTR.equals(resTypeName)) {
return new ResAttr(parentVal, 0, null, null, null);
}
throw new AndrolibException("unsupported res type name for bags. Found: " + resTypeName);
}

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"