You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.0 KiB
Groovy
68 lines
2.0 KiB
Groovy
apply plugin: 'groovy'
|
|
apply plugin: 'java'
|
|
|
|
sourceCompatibility = 1.7
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
compile 'org.codehaus.groovy:groovy-all:2.4.7'
|
|
compile group: 'net.sf.jopt-simple', name: 'jopt-simple', version: '5.0.2'
|
|
testCompile group: 'junit', name: 'junit', version: '4.11'
|
|
}
|
|
|
|
task abootimg(type: Jar, dependsOn:['build']) {
|
|
from files(sourceSets.main.output.classesDir)
|
|
from configurations.runtime.asFileTree.files.collect { zipTree(it) }
|
|
|
|
baseName = 'abootimg'
|
|
manifest {
|
|
attributes 'Main-Class': 'cfig.bootimg.abootimg'
|
|
}
|
|
}
|
|
|
|
task mkbootimg(type: Jar, dependsOn:['build']) {
|
|
from files(sourceSets.main.output.classesDir)
|
|
from configurations.runtime.asFileTree.files.collect { zipTree(it) }
|
|
|
|
baseName = 'mkbootimg'
|
|
manifest {
|
|
attributes 'Main-Class': 'cfig.bootimg.mkbootimg'
|
|
}
|
|
}
|
|
|
|
task repack(type: Jar, dependsOn:['build']) {
|
|
from files(sourceSets.main.output.classesDir)
|
|
from configurations.runtime.asFileTree.files.collect { zipTree(it) }
|
|
|
|
baseName = 'repack'
|
|
manifest {
|
|
attributes 'Main-Class': 'cfig.bootimg.repack'
|
|
}
|
|
}
|
|
|
|
//call Google's 'mkbootimg' program
|
|
task pack_clear(type: JavaExec, dependsOn:[':pack_ramdisk_and_gz', 'build']) {
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
main = "cfig.bootimg.repack_with_cmd"
|
|
args rootProject.outClearIMg, rootProject.rootWorkDir, rootProject.mkbootimgBin
|
|
}
|
|
|
|
//call our 'mkbootimg.groovy'
|
|
task pack_clear2(type: JavaExec, dependsOn:[':pack_ramdisk_and_gz', 'mkbootimg']) {
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
main = "cfig.bootimg.repack_with_cmd"
|
|
args rootProject.outClearIMg + "2" , rootProject.rootWorkDir, "java -jar build/libs/mkbootimg.jar"
|
|
}
|
|
|
|
//directly calls engine of 'mkbootimg.groovy' from 'repack'
|
|
task pack_clear3(type: JavaExec, dependsOn: [':pack_ramdisk_and_gz', 'repack']) {
|
|
classpath = files("build/libs/repack.jar")
|
|
main = 'cfig.bootimg.repack'
|
|
maxHeapSize '512m'
|
|
args rootProject.outClearIMg + "3", rootProject.rootWorkDir
|
|
}
|
|
|