-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
72 lines (60 loc) · 1.64 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
72 lines (60 loc) · 1.64 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
plugins {
kotlin("jvm") version "2.2.0"
`java-library`
`maven-publish`
jacoco
}
group = "com.github.Kilemonn"
version = "0.1.0" // Make sure this version matches the release version in the repo
publishing {
publications {
create<MavenPublication>("maven") {
groupId = group.toString()
artifactId = rootProject.name
version = version
from(components["java"])
pom {
name.set("union")
description.set("A simple union implementation in Java/Kotlin.")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("kilemonn")
}
}
}
}
}
}
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-reflect
runtimeOnly("org.jetbrains.kotlin:kotlin-reflect:2.2.0")
testImplementation(kotlin("test"))
}
kotlin {
jvmToolchain(21)
}
tasks.test {
useJUnitPlatform()
jvmArgs("--add-opens", "java.base/java.util=ALL-UNNAMED",
"--add-opens", "java.base/java.lang=ALL-UNNAMED")
finalizedBy(tasks.jacocoTestReport)
}
jacoco {
toolVersion = "0.8.13"
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // Generate the report after the tests
reports {
xml.required.set(false)
csv.required.set(true)
}
}