2012-09-20 03:19:12 +02:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'maven'
|
2012-09-21 02:28:24 +02:00
|
|
|
apply plugin: 'license'
|
2012-12-27 14:54:08 +01:00
|
|
|
ext.apktoolversion = '1.5.2-SNAPSHOT'
|
2012-12-20 01:19:20 +01:00
|
|
|
ext.fullrev = '';
|
|
|
|
ext.gitrev_version = '';
|
2012-10-08 21:39:58 +02:00
|
|
|
import org.apache.tools.ant.filters.*
|
2012-09-20 03:19:12 +02:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
2012-09-21 04:52:44 +02:00
|
|
|
sourceCompatibility = 1.6
|
|
|
|
targetCompatibility = 1.6
|
|
|
|
|
|
|
|
class Compatibility {
|
|
|
|
String version
|
|
|
|
Compatibility(String versionValue) {
|
|
|
|
def matcher = (versionValue =~ /Java (\d)/)
|
|
|
|
version = matcher[0][1]
|
|
|
|
}
|
|
|
|
String toString() { version }
|
|
|
|
}
|
2012-09-20 03:19:12 +02:00
|
|
|
dependencies {
|
|
|
|
}
|
|
|
|
|
|
|
|
task wrapper(type: Wrapper) {
|
2012-11-27 06:15:17 +01:00
|
|
|
gradleVersion = '1.3'
|
2012-09-20 03:19:12 +02:00
|
|
|
}
|
|
|
|
|
2012-12-20 01:19:20 +01:00
|
|
|
// If anyone uses this outside of GoogleCode (Apktool) developers. I will hunt you down and hurt you.
|
2013-01-10 21:19:57 +01:00
|
|
|
// This is for official releases only.
|
2012-12-20 01:19:20 +01:00
|
|
|
task release {
|
|
|
|
}
|
|
|
|
|
2012-09-21 02:28:24 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.5.0'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-09-20 03:19:12 +02:00
|
|
|
subprojects {
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'maven'
|
|
|
|
apply plugin: 'idea'
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
testCompile 'junit:junit:4.8.2'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
project(':brut.j.common') {
|
|
|
|
dependencies {
|
|
|
|
testCompile "junit:junit:3.8.1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
project(':brut.j.util') {
|
|
|
|
dependencies {
|
2012-09-28 04:05:50 +02:00
|
|
|
compile project(':brut.j.common'), "commons-io:commons-io:2.4"
|
2012-09-20 03:19:12 +02:00
|
|
|
testCompile "junit:junit:3.8.1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
project(':brut.j.dir') {
|
|
|
|
dependencies {
|
|
|
|
compile project(':brut.j.common'), project(':brut.j.util')
|
|
|
|
testCompile "junit:junit:3.8.1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
project(':brut.apktool.smali:util') {
|
|
|
|
dependencies {
|
|
|
|
compile 'commons-cli:commons-cli:1.2'
|
|
|
|
testCompile 'junit:junit:4.6'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
project(':brut.apktool.smali:dexlib') {
|
|
|
|
dependencies {
|
|
|
|
compile 'com.google.code.findbugs:jsr305:1.3.9'
|
|
|
|
compile 'com.google.collections:google-collections:1.0'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
project(':brut.apktool.smali:baksmali') {
|
|
|
|
dependencies {
|
|
|
|
compile project(':brut.apktool.smali:util'), project(':brut.apktool.smali:dexlib')
|
|
|
|
compile 'commons-cli:commons-cli:1.2'
|
|
|
|
compile 'com.google.code.findbugs:jsr305:1.3.9'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
project(':brut.apktool:apktool-lib') {
|
2012-12-20 01:19:20 +01:00
|
|
|
|
|
|
|
// kudos #smali - JesusFreke, for how to build release task
|
|
|
|
if (!('release' in gradle.startParameter.taskNames)) {
|
2013-01-10 21:19:57 +01:00
|
|
|
ant.loadfile(srcFile: "../../.git/refs/heads/master", property: fullrev, failonerror: false);
|
|
|
|
if (ant.properties[fullrev] == null) {
|
|
|
|
gitrev_version = "SNAPSHOT_DEV";
|
|
|
|
println "Building SNAPSHOT (no .git folder found)";
|
|
|
|
} else {
|
|
|
|
gitrev_version = ant.properties[fullrev].substring(0,10);
|
|
|
|
println "Building SNAPSHOT: " + gitrev_version;
|
|
|
|
}
|
2012-12-20 01:19:20 +01:00
|
|
|
} else {
|
|
|
|
gitrev_version = '';
|
|
|
|
println "Building RELEASE: " + apktoolversion;
|
|
|
|
}
|
2012-10-08 21:39:58 +02:00
|
|
|
|
|
|
|
processResources {
|
|
|
|
from('src/main/resources/properties') {
|
|
|
|
include '**/*.properties'
|
|
|
|
into 'properties'
|
2012-12-20 01:19:20 +01:00
|
|
|
filter(ReplaceTokens, tokens: [version: apktoolversion, gitrev: gitrev_version] )
|
2012-10-08 21:39:58 +02:00
|
|
|
}
|
|
|
|
from('src/main/resources/') {
|
|
|
|
include '**/*.jar'
|
|
|
|
}
|
|
|
|
|
|
|
|
includeEmptyDirs = false
|
2012-09-28 04:05:50 +02:00
|
|
|
}
|
2012-09-20 03:19:12 +02:00
|
|
|
dependencies {
|
|
|
|
compile ("junit:junit:4.10") {
|
|
|
|
exclude(module: 'hamcrest-core')
|
2012-10-08 21:39:58 +02:00
|
|
|
}
|
2012-09-20 03:19:12 +02:00
|
|
|
compile project(':brut.j.dir'), project(':brut.j.util'), project(':brut.j.common'), project(':brut.apktool.smali:util'),
|
|
|
|
project(':brut.apktool.smali:dexlib'), project(':brut.apktool.smali:baksmali'),project(':brut.apktool.smali:smali'),
|
2012-12-19 02:40:42 +01:00
|
|
|
"org.yaml:snakeyaml:1.11", "xpp3:xpp3:1.1.4c","xmlunit:xmlunit:1.3", "com.google.guava:guava:12.0",
|
|
|
|
"org.apache.commons:commons-lang3:3.1"
|
2012-09-20 03:19:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
project(':brut.apktool:apktool-cli') {
|
2012-09-27 02:59:25 +02:00
|
|
|
version = apktoolversion
|
|
|
|
|
2012-09-20 03:19:12 +02:00
|
|
|
gradle.taskGraph.whenReady {
|
|
|
|
jar {
|
|
|
|
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
|
|
|
|
|
|
|
|
manifest {
|
|
|
|
attributes("Main-Class": "brut.apktool.Main")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(':brut.apktool:apktool-lib')
|
|
|
|
}
|
2012-09-28 04:05:50 +02:00
|
|
|
}
|