mirror of
https://github.com/skylot/jadx.git
synced 2024-11-27 06:31:15 +00:00
93 lines
2.1 KiB
Groovy
93 lines
2.1 KiB
Groovy
ext.jadxVersion = file('version').readLines().get(0)
|
|
version = jadxVersion
|
|
|
|
apply plugin: 'sonar-runner'
|
|
|
|
subprojects {
|
|
apply plugin: 'java'
|
|
apply plugin: 'groovy'
|
|
apply plugin: 'jacoco'
|
|
apply plugin: 'coveralls'
|
|
|
|
version = jadxVersion
|
|
|
|
tasks.withType(JavaCompile) {
|
|
sourceCompatibility = JavaVersion.VERSION_1_6
|
|
targetCompatibility = JavaVersion.VERSION_1_6
|
|
|
|
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.7'
|
|
|
|
testCompile 'ch.qos.logback:logback-classic:1.1.2'
|
|
testCompile 'junit:junit:4.11'
|
|
testCompile 'org.mockito:mockito-core:1.9.5'
|
|
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'
|
|
testCompile 'cglib:cglib-nodep:3.1'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
jacocoTestReport {
|
|
reports {
|
|
xml.enabled = true // coveralls plugin depends on xml format report
|
|
html.enabled = true
|
|
}
|
|
}
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// setup coveralls (http://coveralls.io/) see http://github.com/kt3k/coveralls-gradle-plugin
|
|
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:0.6.1'
|
|
}
|
|
}
|
|
|
|
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 = '2.0'
|
|
}
|