forked from skylot/jadx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
112 lines (89 loc) · 2.5 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
buildscript {
repositories {
mavenCentral()
jcenter()
}
}
plugins {
id "com.github.kt3k.coveralls" version "2.3.1"
id "info.solidsoft.pitest" version "1.1.4"
// id "com.github.ben-manes.versions" version "0.8"
}
apply plugin: 'sonar-runner'
ext.jadxVersion = file('version').readLines().get(0)
version = jadxVersion
subprojects {
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.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.10'
testCompile 'ch.qos.logback:logback-classic:1.1.2'
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'cglib:cglib-nodep:3.1'
}
repositories {
mavenCentral()
mavenLocal()
jcenter()
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
}
/* Sonar runner configuration */
repositories {
mavenCentral()
}
sonarRunner {
toolVersion = '2.4'
}
task copyArtifacts(type: Sync, dependsOn: ['jadx-cli:installDist', 'jadx-gui:installDist']) {
destinationDir file("$buildDir/jadx")
['jadx-cli', 'jadx-gui'].each {
from tasks.getByPath(":${it}:installDist").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 testAppCheck(dependsOn: 'jadx-test-app:testAppCheck') {
}
task pitest(overwrite: true, dependsOn: 'jadx-core:pitest') {
}
task cleanBuildDir(type: Delete) {
delete buildDir
}
build.dependsOn(dist, samples)
clean.dependsOn(cleanBuildDir)
task wrapper(type: Wrapper) {
gradleVersion = '2.7'
}