74 lines
1.6 KiB
Groovy
74 lines
1.6 KiB
Groovy
ext.jadxVersion = file('version').readLines().get(0)
|
|
version = jadxVersion
|
|
|
|
apply plugin: 'sonar-runner'
|
|
|
|
subprojects {
|
|
apply plugin: 'java'
|
|
apply plugin: 'jacoco'
|
|
apply plugin: 'idea'
|
|
apply plugin: 'eclipse'
|
|
|
|
sourceCompatibility = 1.6
|
|
targetCompatibility = 1.6
|
|
|
|
version = jadxVersion
|
|
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(Compile) {
|
|
if (!"${it}".contains(':jadx-samples:')) {
|
|
options.compilerArgs << '-Xlint' << '-Xlint:unchecked' << '-Xlint:deprecation'
|
|
}
|
|
}
|
|
}
|
|
|
|
jar {
|
|
version = jadxVersion
|
|
manifest {
|
|
mainAttributes('jadx-version': jadxVersion)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile 'org.slf4j:slf4j-api:1.7.6'
|
|
testCompile 'junit:junit:4.11'
|
|
testCompile 'org.mockito:mockito-core:1.9.5'
|
|
testCompile 'ch.qos.logback:logback-classic:1.1.1'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
}
|
|
|
|
task copyArtifacts(type: Sync, dependsOn: ['jadx-cli:installApp', 'jadx-gui:installApp']) {
|
|
destinationDir file("$buildDir/jadx")
|
|
['jadx-cli', 'jadx-gui'].each {
|
|
from tasks.getByPath(":${it}:installApp").destinationDir
|
|
}
|
|
}
|
|
|
|
task pack(type: Zip, dependsOn: copyArtifacts) {
|
|
destinationDir buildDir
|
|
archiveName "jadx-${jadxVersion}.zip"
|
|
from copyArtifacts.destinationDir
|
|
}
|
|
|
|
task dist(dependsOn: pack) {
|
|
description = 'Build jadx distribution zip'
|
|
}
|
|
|
|
task samples(dependsOn: 'jadx-samples:samples') {
|
|
}
|
|
|
|
task build(dependsOn: [dist, samples]) {
|
|
}
|
|
|
|
task clean(type: Delete) {
|
|
delete buildDir
|
|
}
|
|
|
|
task wrapper(type: Wrapper) {
|
|
gradleVersion = '1.11'
|
|
}
|