-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
105 lines (95 loc) · 3.46 KB
/
build.gradle.kts
File metadata and controls
105 lines (95 loc) · 3.46 KB
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
plugins {
application
id("tai-e.conventions")
id("maven-publish.conventions")
}
group = projectGroupId
description = projectArtifactId
version = projectVersion
dependencies {
// Process options
implementation("info.picocli:picocli:4.7.3")
// Logger
implementation("org.apache.logging.log4j:log4j-api:2.20.0")
implementation("org.apache.logging.log4j:log4j-core:2.20.0")
// Process YAML configuration files
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.0")
// Use Soot as frontend
implementation(files("lib/sootclasses-modified.jar"))
"org.soot-oss:soot:4.4.1".let {
// Disable transitive dependencies from Soot in compile classpath
compileOnly(it) { isTransitive = false }
testCompileOnly(it) { isTransitive = false }
runtimeOnly(it)
}
// Use ASM to read Java class files
implementation("org.ow2.asm:asm:9.4")
// Eliminate SLF4J warning
implementation("org.slf4j:slf4j-nop:2.0.7")
// JSR305, for javax.annotation
implementation("com.google.code.findbugs:jsr305:3.0.2")
// Use asm to read java class file
implementation("org.ow2.asm:asm:9.4")
implementation("org.ow2.asm:asm-commons:9.5")
implementation("org.ow2.asm:asm-tree:9.5")
implementation("org.ow2.asm:asm-util:9.5")
implementation("org.eclipse.jdt:org.eclipse.jdt.core:3.28.0")
implementation("org.sat4j:org.sat4j.core:2.3.1")
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.platform:junit-platform-suite")
}
application {
mainClass.set("pascal.taie.Main")
}
task("fatJar", type = Jar::class) {
group = "build"
description = "Creates a single jar file including Tai-e and all dependencies"
manifest {
attributes["Main-Class"] = "pascal.taie.Main"
}
archiveBaseName.set("tai-e-all")
from(
configurations.runtimeClasspath.get().map {
if (it.isDirectory) it else zipTree(it)
}
)
from("COPYING", "COPYING.LESSER")
destinationDirectory.set(rootProject.buildDir)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
with(tasks["jar"] as CopySpec)
}
task("nullpath", type = Jar::class) {
group = "build"
description = "Creates a single jar file including NullPath and all dependencies"
manifest {
attributes["Main-Class"] = "pascal.taie.analysis.bugfinder.pathsensnullpointer.NullPointerMain"
}
archiveBaseName.set("nullpath")
from(
configurations.runtimeClasspath.get().map {
if (it.isDirectory) it else zipTree(it)
}
)
from("COPYING", "COPYING.LESSER")
destinationDirectory.set(rootProject.buildDir)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
with(tasks["jar"] as CopySpec)
exclude("META-INF/*.SF")
exclude("META-INF/*.DSA")
exclude("META-INF/*.RSA")
}
tasks.jar {
from("COPYING", "COPYING.LESSER")
destinationDirectory.set(rootProject.buildDir)
}
tasks.test {
// Increases the maximum heap memory of JUnit test process. The default is 512M.
// (see org.gradle.process.internal.worker.DefaultWorkerProcessBuilder.build)
maxHeapSize = "2G"
}
// Automatically agree the Gradle ToS when running gradle with '--scan' option
extensions.findByName("buildScan")?.withGroovyBuilder {
setProperty("termsOfServiceUrl", "https://gradle.com/terms-of-service")
setProperty("termsOfServiceAgree", "yes")
}