-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
81 lines (69 loc) · 2.27 KB
/
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
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.22"
application
alias(libs.plugins.serialization)
}
group = "org.cryptobiotic"
version = "2.1-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation(files("libs/verificatum-vecj-2.2.0.jar"))
implementation(libs.bundles.eglib)
implementation(libs.bundles.logging)
testImplementation(libs.bundles.egtest)
testImplementation(libs.kotlin.test)
testImplementation(libs.mockk)
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
////////////////
tasks {
val ENABLE_PREVIEW = "--enable-preview"
withType<JavaCompile>() {
options.compilerArgs.add(ENABLE_PREVIEW)
// Optionally we can show which preview feature we use.
options.compilerArgs.add("-Xlint:preview")
// options.compilerArgs.add("--enable-native-access=org.openjdk.jextract")
// Explicitly setting compiler option --release
// is needed when we wouldn't set the
// sourceCompatiblity and targetCompatibility
// properties of the Java plugin extension.
options.release.set(17)
}
withType<Test>().all {
useJUnitPlatform()
minHeapSize = "512m"
maxHeapSize = "8g"
jvmArgs = listOf("-Xss128m", "--enable-preview")
// Make tests run in parallel
// More info: https://www.jvt.me/posts/2021/03/11/gradle-speed-parallel/
systemProperties["junit.jupiter.execution.parallel.enabled"] = "true"
systemProperties["junit.jupiter.execution.parallel.mode.default"] = "concurrent"
systemProperties["junit.jupiter.execution.parallel.mode.classes.default"] = "concurrent"
}
withType<JavaExec>().all {
jvmArgs("--enable-preview")
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
}
tasks.register<Jar>("uberJar") {
archiveClassifier = "uber"
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes("Main-Class" to "org.cryptobiotic.eg.cli.RunShowSystem")
}
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}