forked from ThexXTURBOXx/dex2jar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
106 lines (90 loc) · 2.78 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
plugins {
id "application"
id "com.github.johnrengelman.shadow" version "8.1.1"
}
ext.antlr3Version = '3.5.3'
ext.antlr4Version = '4.9.3' // Newer versions only for Java 11+
ext.asmVersion = '9.5'
ext.baksmaliVersion = '2.5.2'
ext.commonsCompressVersion = '1.22'
ext.jUnitVersion = '5.9.2'
ext.r8Version = '4.0.52'
allprojects {
group = 'com.googlecode.d2j'
version = '2.1-SNAPSHOT'
repositories {
mavenCentral()
google()
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
sourceCompatibility = targetCompatibility = 1.8
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
testImplementation "org.junit.jupiter:junit-jupiter-api:${project.property('jUnitVersion')}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${project.property('jUnitVersion')}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${project.property('jUnitVersion')}"
}
[compileJava, compileTestJava]*.options.collect { options -> options.encoding = 'UTF-8' }
test {
useJUnitPlatform()
systemProperty 'junit.jupiter.execution.parallel.enabled', true
systemProperty 'junit.jupiter.execution.parallel.mode.default', 'concurrent'
}
// Cache list of tasks
project.getAllTasks(true)
publishing {
publications {
if (tasks.findByName("shadowJar") == null)
mavenJava(MavenPublication) {
from(components.java)
}
else
mavenJava(MavenPublication) {
artifact(tasks.findByName("shadowJar"))
}
}
}
}
mainClassName = "com.googlecode.dex2jar.tools.Dex2jarCmd"
archivesBaseName = "dex2jar"
dependencies {
implementation(project(":d2j-base-cmd")) {
transitive = false
}
implementation(project(":d2j-external")) // Transitive please
implementation(project(":d2j-jasmin")) {
transitive = false
}
implementation(project(":d2j-smali")) {
transitive = false
}
implementation(project(":dex-ir")) {
transitive = false
}
implementation(project(":dex-reader")) {
transitive = false
}
implementation(project(":dex-reader-api")) {
transitive = false
}
implementation(project(":dex-tools")) {
transitive = false
}
implementation(project(":dex-translator")) {
transitive = false
}
implementation(project(":dex-writer")) {
transitive = false
}
}
tasks.jar.enabled = false // Don't build normal jar
shadowJar {
archiveClassifier.set(null)
}
// Get rid of Gradle warnings
tasks.distTar.dependsOn tasks.shadowJar
tasks.distZip.dependsOn tasks.shadowJar
tasks.startScripts.dependsOn tasks.shadowJar