2013-01-16 23:06:32 +01:00
|
|
|
/**
|
2014-10-24 01:14:48 +02:00
|
|
|
* Copyright 2014 Ryszard Wiśniewski <brut.alll@gmail.com>
|
2013-01-16 23:06:32 +01:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2014-10-23 15:05:14 +02:00
|
|
|
apply plugin: 'eu.appsatori.fatjar'
|
2013-01-16 23:06:32 +01:00
|
|
|
|
2015-05-01 17:26:10 +02:00
|
|
|
dependencies {
|
|
|
|
compile project(':brut.apktool:apktool-lib')
|
2013-01-17 04:51:04 +01:00
|
|
|
}
|
|
|
|
|
2015-05-01 17:26:10 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath depends.proguard_gradle
|
|
|
|
}
|
2013-01-16 23:06:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
gradle.taskGraph.whenReady {
|
2013-01-17 14:58:50 +01:00
|
|
|
fatJar {
|
2013-01-16 23:06:32 +01:00
|
|
|
manifest {
|
|
|
|
attributes("Main-Class": "brut.apktool.Main")
|
|
|
|
}
|
|
|
|
}
|
2013-01-17 04:51:04 +01:00
|
|
|
}
|
|
|
|
|
2014-02-09 01:05:57 +01:00
|
|
|
task cleanOutputDirectory(type: Delete) {
|
|
|
|
delete fileTree(dir: jar.destinationDir.getPath(), exclude: "apktool-cli.jar")
|
|
|
|
}
|
|
|
|
|
2015-05-01 17:26:10 +02:00
|
|
|
task proguard(type: proguard.gradle.ProGuardTask, dependsOn: fatJar) {
|
2014-02-04 16:54:00 +01:00
|
|
|
def outFile = jar.destinationDir.getPath() + '/' + "apktool" + '-' + project.apktool_version + '-small' + '.' + jar.extension
|
2015-05-01 17:26:10 +02:00
|
|
|
|
|
|
|
injars fatJar.archivePath
|
|
|
|
outjars outFile
|
|
|
|
|
|
|
|
libraryjars "${System.properties['java.home']}/lib/rt.jar"
|
|
|
|
|
|
|
|
dontobfuscate
|
|
|
|
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.**'
|
|
|
|
dontwarn 'com.google.common.util.**'
|
|
|
|
dontwarn 'javax.xml.xpath.**'
|
|
|
|
dontnote '**'
|
2013-01-17 04:51:04 +01:00
|
|
|
}
|
|
|
|
|
2014-02-09 01:05:57 +01:00
|
|
|
proguard.dependsOn cleanOutputDirectory
|
2013-01-17 04:51:04 +01:00
|
|
|
tasks.getByPath(':release').dependsOn(proguard)
|