-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
138 lines (102 loc) · 3.62 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
138 lines (102 loc) · 3.62 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "2.3.10"
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
version = "1.3.5"
allprojects {
group = "com.github.holgerbrandl"
repositories {
mavenCentral()
mavenLocal()
}
}
dependencies {
api("org.apache.commons:commons-math3:3.6.1")
// note update to latest version postponed because of regression errors
// api("io.insert-koin:koin-core:3.1.2")
api("io.insert-koin:koin-core:4.1.0")
api("org.json:json:20251224")
api("com.github.holgerbrandl:jsonbuilder:0.10")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") // 0.7.1 marks kotlinx-datetime as deprecated
api("io.github.oshai:kotlin-logging-jvm:7.0.14")
api("com.github.holgerbrandl:kdfutils:1.6.0")
api("org.jetbrains.kotlinx:dataframe-csv:1.0.0-Beta4")
implementation("com.google.code.gson:gson:2.13.2")
// implementation("org.jetbrains.kotlin:kotlin-reflect:2.1.20")
testImplementation("io.kotest:kotest-assertions-core:6.0.7")
//experimental dependencies use for experimentation
testImplementation("com.thoughtworks.xstream:xstream:1.4.21")
testImplementation("org.slf4j:slf4j-simple:2.0.17")
testImplementation(kotlin("script-runtime"))
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
//https://gist.github.com/domnikl/c19c7385927a7bef7217aa036a71d807
val jar by tasks.getting(Jar::class) {
manifest {
// attributes["Main-Class"] = "com.example.MainKt"
attributes["Implementation-Title"] = "kalasim"
attributes["Implementation-Version"] = project.version
}
}
java {
withJavadocJar()
withSourcesJar()
}
// see https://youtrack.jetbrains.com/issue/KT-52735
val compileKotlin: KotlinCompile by tasks
compileKotlin.compilerOptions {
freeCompilerArgs.addAll(listOf("-Xallow-any-scripts-in-source-roots"))
// freeCompilerArgs.addAll(listOf("-Xcontext-receivers"))
}
kotlin {
jvmToolchain(21)
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
url.set("https://www.kalasim.org")
name.set("kalasim")
description.set("kalasim is a process-oriented discrete event simulation engine")
scm {
connection.set("scm:git:github.com/holgerbrandl/kalasim.git")
url.set("https://github.com/holgerbrandl/kalasim.git")
}
licenses {
license {
name.set("MIT License")
url.set("https://raw.githubusercontent.com/holgerbrandl/kalasim/master/LICENSE")
}
}
developers {
developer {
id.set("holgerbrandl")
name.set("Holger Brandl")
email.set("holgerbrandl@gmail.com")
}
}
}
}
}
}
nexusPublishing {
repositories {
// see https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#configuration
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}
signing {
sign(publishing.publications["maven"])
}
fun findProperty(s: String) = project.findProperty(s) as String?