mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-04 10:02:55 +01:00
Merge branch 'master' into master
This commit is contained in:
commit
7619fbcdbe
@ -13,6 +13,8 @@ matrix:
|
||||
jdk: openjdk8
|
||||
- os: linux
|
||||
jdk: oraclejdk8
|
||||
- os: linux
|
||||
jdk: oraclejdk11
|
||||
- os: osx
|
||||
osx_image: xcode9.2
|
||||
- os: windows
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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>();
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user