This repository was archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
107 lines (100 loc) · 2.97 KB
/
build.gradle.kts
File metadata and controls
107 lines (100 loc) · 2.97 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
import kotlinx.kover.gradle.plugin.dsl.CoverageUnit
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
plugins {
kotlin("multiplatform") version "2.0.20"
id("org.jetbrains.kotlinx.kover") version "0.8.1"
`maven-publish`
id("com.vanniktech.maven.publish") version "0.28.0"
id("org.jetbrains.dokka") version "1.9.20"
}
val githubUser = "goquati"
val artifactId = "ksv"
group = "io.github.$githubUser"
version = System.getenv("GIT_TAG_VERSION") ?: "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
kotlin {
jvm()
js {
browser()
nodejs()
}
macosX64()
macosArm64()
linuxX64()
linuxArm64()
mingwX64()
sourceSets {
val commonMain by getting {
explicitApi()
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
allWarningsAsErrors = true
apiVersion.set(KotlinVersion.KOTLIN_2_0)
languageVersion.set(KotlinVersion.KOTLIN_2_0)
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
}
}
val commonTest by getting {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-test")
implementation("io.kotest:kotest-assertions-core:5.9.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0-RC")
}
}
}
}
kover {
reports {
verify {
CoverageUnit.values().forEach { covUnit ->
rule("minimal ${covUnit.name.lowercase()} coverage rate") {
minBound(100, coverageUnits = covUnit)
}
}
}
}
}
mavenPublishing {
coordinates(
groupId = group as String,
artifactId = artifactId,
version = version as String
)
pom {
name = artifactId
description = "A Kotlin library for type-safe CSV writing with coroutine support."
url = "https://github.com/$githubUser/$artifactId"
licenses {
license {
name = "MIT License"
url = "https://github.com/$githubUser/$artifactId/blob/main/LICENSE"
}
}
developers {
developer {
id = githubUser
name = githubUser
url = "https://github.com/$githubUser"
}
}
scm {
url = "https://github.com/$githubUser/$artifactId"
connection = "scm:git:https://github.com/$githubUser/$artifactId.git"
developerConnection = "scm:git:git@github.com:$githubUser/$artifactId.git"
}
}
publishToMavenCentral(
SonatypeHost.CENTRAL_PORTAL,
automaticRelease = true,
)
signAllPublications()
}
tasks.dokkaHtml.configure {
moduleVersion = version as String
}