mirror of
https://github.com/skylot/jadx.git
synced 2024-12-11 14:34:05 +00:00
53 lines
1.3 KiB
Groovy
53 lines
1.3 KiB
Groovy
project.ext {
|
|
mainSamplesClass = "jadx.samples.RunTests"
|
|
samplesJadxSrcDir = "${buildDir}/samples-jadx/src"
|
|
samplesJadxOutDir = "${buildDir}/samples-jadx/output"
|
|
}
|
|
|
|
dependencies {
|
|
compile(project(":jadx-core"))
|
|
compile(project(":jadx-cli"))
|
|
}
|
|
|
|
compileJava {
|
|
options.compilerArgs << '-g:none'
|
|
}
|
|
|
|
task samplesRun(type: JavaExec, dependsOn: compileJava) {
|
|
classpath = sourceSets.main.output
|
|
main = mainSamplesClass
|
|
}
|
|
|
|
task samplesJar(type: Jar, dependsOn: samplesRun) {
|
|
baseName = 'samples'
|
|
from sourceSets.main.output
|
|
}
|
|
|
|
task samplesJadxCreate(type: JavaExec, dependsOn: samplesJar) {
|
|
classpath = sourceSets.main.output + configurations.compile
|
|
main = project(":jadx-cli").mainClassName
|
|
args = ['-d', samplesJadxSrcDir, samplesJar.archivePath]
|
|
}
|
|
|
|
task samplesJadxCompile(type: JavaCompile, dependsOn: samplesJadxCreate) {
|
|
classpath = configurations.compile
|
|
destinationDir = file samplesJadxOutDir
|
|
source = samplesJadxSrcDir
|
|
options.encoding = "UTF-8"
|
|
}
|
|
|
|
task samplesJadxRun(type: JavaExec, dependsOn: samplesJadxCompile) {
|
|
classpath = files samplesJadxOutDir
|
|
main = mainSamplesClass
|
|
}
|
|
|
|
task samples(dependsOn: samplesJadxRun) {
|
|
}
|
|
|
|
task cleanGeneratedFiles(type: Delete) {
|
|
delete samplesJadxSrcDir
|
|
delete samplesJadxOutDir
|
|
}
|
|
|
|
clean.dependsOn cleanGeneratedFiles
|