update build.gradle to handle patching smali

This commit is contained in:
Connor Tumbleson 2015-10-14 07:42:30 -05:00
parent 7786ba6fdd
commit ca917cf103
1 changed files with 31 additions and 11 deletions

View File

@ -13,12 +13,31 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
buildscript {
repositories {
jcenter()
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.incremental = true
}
dependencies {
classpath 'eu.appsatori:gradle-fatjar-plugin:0.3'
}
}
plugins {
id 'net.minecrell.gitpatcher' version '0.7.1'
}
apply plugin: 'maven'
apply from: 'gradle/functions.gradle'
def apktoolversion_major = '2.0.3'
def apktoolversion_minor = 'SNAPSHOT';
defaultTasks 'clean', 'applyPatches', 'build', 'fatJar', 'proguard'
allprojects {
apply plugin: 'java'
sourceCompatibility = 1.7
@ -58,6 +77,14 @@ build.doFirst {
"Currently it is set to: " + System.getProperty("java.home")
);
}
println 'Applying smali patches...'
rootProject.tasks.applyPatches
}
clean.doFirst {
delete "${rootDir}/brut.apktool.smali"
println "deleting ${rootDir}/brut.apktool.smali in favor of smali"
}
task wrapper(type: Wrapper) {
@ -68,17 +95,10 @@ task wrapper(type: Wrapper) {
task release {
}
buildscript {
repositories {
jcenter()
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.incremental = true
}
dependencies {
classpath 'eu.appsatori:gradle-fatjar-plugin:0.3'
}
patches {
submodule = 'smali'
target = file('brut.apktool.smali')
patches = file('gradle/smali-patches')
}
subprojects {