mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-11 21:37:47 +01:00
Move to shadowJar, leaving fatJar behind
- plugin was deprecated
This commit is contained in:
parent
90b7d4b9b5
commit
dfbcf298c2
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
apply plugin: 'eu.appsatori.fatjar'
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
|
||||
dependencies {
|
||||
compile depends.commons_cli
|
||||
@ -30,22 +30,20 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
gradle.taskGraph.whenReady {
|
||||
fatJar {
|
||||
jar {
|
||||
manifest {
|
||||
attributes("Main-Class": "brut.apktool.Main")
|
||||
attributes 'Main-Class' : 'brut.apktool.Main'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task cleanOutputDirectory(type: Delete) {
|
||||
delete fileTree(dir: jar.destinationDir.getPath(), exclude: "apktool-cli.jar")
|
||||
delete fileTree(dir: jar.destinationDir.getPath(), exclude: "apktool-cli-all.jar")
|
||||
}
|
||||
|
||||
task proguard(type: proguard.gradle.ProGuardTask, dependsOn: fatJar) {
|
||||
task proguard(type: proguard.gradle.ProGuardTask, dependsOn: shadowJar) {
|
||||
def outFile = jar.destinationDir.getPath() + '/' + "apktool" + '-' + project.apktool_version + '-small' + '.' + jar.extension
|
||||
|
||||
injars fatJar.archivePath
|
||||
injars shadowJar.archivePath
|
||||
outjars outFile
|
||||
|
||||
libraryjars "${System.properties['java.home']}/lib/rt.jar"
|
||||
@ -54,7 +52,6 @@ task proguard(type: proguard.gradle.ProGuardTask, dependsOn: fatJar) {
|
||||
dontoptimize
|
||||
|
||||
keep 'public class brut.apktool.Main { public static void main(java.lang.String[]); }'
|
||||
keep 'class org.yaml.snakeyaml.** { public protected private *; }'
|
||||
keepclassmembers 'enum * { public static **[] values(); public static ** valueOf(java.lang.String); }'
|
||||
dontwarn 'com.google.common.base.**'
|
||||
dontwarn 'com.google.common.collect.**'
|
||||
|
@ -21,17 +21,16 @@ buildscript {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
dependencies {
|
||||
classpath 'eu.appsatori:gradle-fatjar-plugin:0.3'
|
||||
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'maven'
|
||||
apply from: 'gradle/functions.gradle'
|
||||
|
||||
def apktoolversion_major = '2.2.3'
|
||||
def apktoolversion_minor = 'SNAPSHOT';
|
||||
|
||||
defaultTasks 'build', 'fatJar', 'proguard'
|
||||
defaultTasks 'build', 'shadowJar', 'proguard'
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'java'
|
||||
@ -80,8 +79,6 @@ task release {
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'idea'
|
||||
|
||||
ext {
|
||||
depends = [
|
||||
|
Loading…
Reference in New Issue
Block a user