-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (78 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
plugins {
id 'java'
id 'idea'
}
repositories {
mavenCentral()
google()
// This seems to be a temporary fix to properly build the JAR. Remove once smali/baksmali/dexlib2 is fetched from
// official Google repo, see https://github.com/iBotPeaches/Apktool/pull/2941.
// maven {
// url 'https://jitpack.io'
// content {
// includeGroup('com.github.iBotPeaches.smali')
// }
// }
}
group 'de.uni-passau.fim.auermich.android-analysis'
// version '1.0-SNAPSHOT'
compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
options.encoding = "UTF-8"
}
tasks.withType(Javadoc) {
options.encoding = "UTF-8"
}
// includes the libs dir as a flat directory
repositories {
flatDir {
dir rootProject.file('libs')
}
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.1")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.14.1'
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.14.1'
// https://mvnrepository.com/artifact/org.smali/dexlib2
implementation group: 'com.android.tools.smali', name: 'smali-dexlib2', version: '3.0.3'
// use local multidexlib2 dependency generated with the simple 'jar' task (no external dependency included)
implementation name: 'multidexlib2'
// https://mvnrepository.com/artifact/org.apktool/apktool-lib
implementation group: 'org.apktool', name: 'apktool-lib', version: '2.9.0'
// https://mvnrepository.com/artifact/commons-io/commons-io
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
// https://mvnrepository.com/artifact/com.google.guava/guava
implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'
}
task customFatJar(type: Jar) {
manifest {
attributes (
"Main-Class": "de.uni_passau.fim.auermich.android_analysis.Main",
"Multi-Release": true
)
}
archiveName(rootProject.name + '.jar')
from {
(configurations.compile.findAll { !it.path.endsWith(".pom") }).collect {
it.isDirectory() ? it : zipTree(it) }
(configurations.runtimeClasspath.findAll { !it.path.endsWith(".pom") }).collect {
it.isDirectory() ? it : zipTree(it) }
}
with jar
}
test {
useJUnitPlatform()
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}