-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
119 lines (92 loc) · 3.34 KB
/
build.gradle.kts
File metadata and controls
119 lines (92 loc) · 3.34 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
plugins {
application
id("com.ncorti.ktfmt.gradle") version "0.24.0"
id("org.pkl-lang") version "0.30.2"
kotlin("kapt") version "2.3.0"
kotlin("jvm") version "2.3.0"
}
group = "ac.at.uibk.dps.cirrina"
version = rootProject.file("version.txt").readText().trim()
val jdk25SecurityArgs =
listOf("--enable-native-access=ALL-UNNAMED", "--sun-misc-unsafe-memory-access=allow")
val allRuntimeArgs = jdk25SecurityArgs
application {
mainClass.set("at.ac.uibk.dps.cirrina.CirrinaKt")
applicationDefaultJvmArgs = allRuntimeArgs
}
java { toolchain { languageVersion.set(JavaLanguageVersion.of(25)) } }
ktfmt { googleStyle() }
dependencies {
implementation("com.google.dagger:dagger:2.59")
kapt("com.google.dagger:dagger-compiler:2.59")
implementation("com.google.guava:guava:33.4.0-jre")
implementation("org.apache.commons:commons-jexl3:3.3")
implementation("org.jgrapht:jgrapht-core:1.5.2")
implementation("org.jgrapht:jgrapht-io:1.5.2")
implementation("org.apache.fory:fory-core:0.15.0")
implementation("org.apache.fory:fory-kotlin:0.15.0")
implementation("io.etcd:jetcd-core:0.8.6")
implementation("org.eclipse.zenoh:zenoh-kotlin:1.7.2")
implementation("io.netty:netty-common:4.1.121.Final")
implementation("io.github.microutils:kotlin-logging:3.0.5")
implementation("io.micrometer:micrometer-core:1.16.4")
implementation("org.slf4j:slf4j-jdk14:2.0.12")
implementation("io.dropwizard.metrics:metrics-core:4.2.38")
implementation("org.pkl-lang:pkl-config-java:0.30.2")
implementation("org.pkl-lang:pkl-codegen-java:0.30.2")
implementation("jakarta.annotation:jakarta.annotation-api:3.0.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
implementation(kotlin("stdlib-jdk8"))
testImplementation(platform("org.junit:junit-bom:5.11.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit-pioneer:junit-pioneer:2.3.0")
testImplementation("org.mockito:mockito-core:5.14.2")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.4.0")
}
repositories {
mavenCentral()
gradlePluginPortal()
maven(url = "https://repository.cloudera.com/artifactory/cloudera-repos/")
}
sourceSets {
main {
kotlin {
srcDirs("src/main/kotlin")
srcDir("build/generated/pkl/pklGenJava/java")
}
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_25)
freeCompilerArgs.addAll("-Xjdk-release=25", "-Xlambdas=indy", "-Xemit-jvm-type-annotations")
}
}
tasks.compileKotlin { dependsOn(tasks.ktfmtFormat) }
tasks.test {
useJUnitPlatform()
jvmArgs(allRuntimeArgs)
systemProperty(
"java.util.logging.config.file",
"${project.projectDir}/src/test/resources/logging.properties",
)
testLogging { showStandardStreams = true }
}
tasks.withType<JavaExec> { jvmArgs(allRuntimeArgs) }
tasks.distZip { archiveFileName.set("${project.name}.zip") }
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = "at.ac.uibk.dps.cirrina.CirrinaKt"
attributes["Implementation-Version"] = version
attributes["Enable-Native-Access"] = "ALL-UNNAMED"
}
}
pkl {
javaCodeGenerators {
register("pklGenJava") {
sourceModules.addAll("src/main/resources/pkl/csm/csml.pkl")
generateGetters.set(true)
generateJavadoc.set(true)
}
}
}