39 lines
1.3 KiB
Groovy
39 lines
1.3 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
description = "A utility for doing compile or runtime code generation targeting Android's Dalvik VM"
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion androidCompileSdkVersion.toInteger()
|
|
ndkVersion androidCompileNdkVersion
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly files(project(":dalvikdx").tasks.getByName("makeJarRelease").outputs)
|
|
}
|
|
|
|
afterEvaluate {
|
|
android.applicationVariants.all { variant ->
|
|
def variantNameCapped = variant.name.capitalize()
|
|
def variantNameLowered = variant.name.toLowerCase()
|
|
|
|
task("copyDex${variantNameCapped}", type: Copy) {
|
|
dependsOn "assemble${variantNameCapped}"
|
|
def dexOutPath = "${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}"
|
|
from (dexOutPath){
|
|
rename("classes.dex", "eddexmaker.dex")
|
|
}
|
|
destinationDir file(templateRootPath + "system/framework/")
|
|
outputs.upToDateWhen { false }
|
|
}
|
|
task("makeJar${variantNameCapped}", type: Jar, dependsOn: "assemble${variantNameCapped}") {
|
|
dependsOn "assemble${variantNameCapped}"
|
|
from "${buildDir}/intermediates/javac/${variantNameLowered}/classes"
|
|
baseName "dexmaker"
|
|
outputs.file(archivePath)
|
|
}
|
|
}
|
|
} |