forked from pascal-lab/Tai-e-assignments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
40 lines (33 loc) · 871 Bytes
/
build.gradle.kts
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
plugins {
id("java")
id("application")
}
repositories {
mavenCentral()
}
dependencies {
implementation(files("lib/tai-e-assignment.jar"))
implementation(files("../../lib/dependencies.jar"))
testImplementation("junit:junit:4.13")
}
application {
mainClass.set("pascal.taie.Assignment")
}
tasks.compileJava { options.encoding = "UTF-8" }
tasks.compileTestJava { options.encoding = "UTF-8" }
tasks.test {
useJUnit()
maxHeapSize = "4G"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
val libDir = project.projectDir.parentFile.parentFile.resolve("lib")
libDir.listFiles()
?.map { it.name }
?.toList()
?.containsAll(listOf("dependencies.jar", "rt.jar"))
?.takeIf { it }
?: throw IllegalStateException("Could not find dependencies.jar or rt.jar in ${libDir.absolutePath}")