mirror of
https://github.com/revanced/Apktool.git
synced 2025-06-13 05:27:36 +02:00
gradle redo (moved each to their own project for organization)
This commit is contained in:
60
brut.apktool/apktool-cli/build.gradle
Normal file
60
brut.apktool/apktool-cli/build.gradle
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
* Copyright 2011 Ryszard Wiśniewski <brut.alll@gmail.com>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
version = apktoolversion
|
||||
|
||||
configurations {
|
||||
proguard
|
||||
}
|
||||
|
||||
dependencies {
|
||||
proguard 'net.sf.proguard:proguard-base:4.8'
|
||||
compile project(':brut.apktool:apktool-lib')
|
||||
}
|
||||
|
||||
gradle.taskGraph.whenReady {
|
||||
jar {
|
||||
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||
|
||||
manifest {
|
||||
attributes("Main-Class": "brut.apktool.Main")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task proguard(type: JavaExec, dependsOn: jar) {
|
||||
def outFile = jar.destinationDir.getPath() + '/' + jar.baseName + '-' + jar.version + '-small' + '.' + jar.extension
|
||||
inputs.file jar.archivePath
|
||||
outputs.file outFile
|
||||
|
||||
classpath = configurations.proguard
|
||||
main = 'proguard.ProGuard'
|
||||
args '-injars ' + jar.archivePath
|
||||
args '-outjars ' + outFile
|
||||
args '-dontobfuscate'
|
||||
args '-libraryjars ' + System.properties['java.home'] + '/lib/rt.jar'
|
||||
args '-dontoptimize'
|
||||
args '-dontskipnonpubliclibraryclassmembers'
|
||||
args '-keep public class brut.apktool.Main { public static void main(java.lang.String[]); }'
|
||||
args '-keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); }'
|
||||
args '-dontwarn com.google.common.base.**'
|
||||
args '-dontnote com.google.common.base.**'
|
||||
args '-dontwarn sun.**'
|
||||
args '-dontnote sun.**'
|
||||
}
|
||||
|
||||
tasks.getByPath(':release').dependsOn(proguard)
|
||||
|
Reference in New Issue
Block a user