/
build.gradle.kts
94 lines (84 loc) · 2.23 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
82
83
84
85
86
87
88
89
90
91
92
93
94
import com.vanniktech.maven.publish.SonatypeHost
plugins {
kotlin("multiplatform") version "1.9.22"
id("com.vanniktech.maven.publish") version "0.28.0"
id("io.github.skeptick.libres") version "1.2.2"
}
group = "nl.jacobras"
version = "1.7.0"
mavenPublishing {
publishToMavenCentral(SonatypeHost.S01, true)
signAllPublications()
@Suppress("UnstableApiUsage")
pom {
name.set("Human Readable")
description.set("A small set of data formatting utilities for Kotlin Multiplatform (KMP)")
url.set("https://github.com/jacobras/human-readable")
licenses {
license {
name.set("MIT")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("jacobras")
name.set("Jacob Ras")
email.set("info@jacobras.nl")
}
}
scm {
url.set("https://github.com/jacobras/human-readable")
}
}
}
repositories {
mavenCentral()
}
kotlin {
applyDefaultHierarchyTemplate()
iosX64()
iosArm64()
iosSimulatorArm64()
js {
browser {
testTask {
useKarma {
useChromeHeadless()
}
}
}
}
jvm {
jvmToolchain(8)
withJava()
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.5.0")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation(libs.assertK)
}
}
val appleAndJsMain by creating {
dependsOn(commonMain)
appleMain.get().dependsOn(this)
jsMain.get().dependsOn(this)
}
}
}
// From https://github.com/gradle/gradle/issues/26091#issuecomment-1722947958
tasks.withType<AbstractPublishToMaven>().configureEach {
val signingTasks = tasks.withType<Sign>()
mustRunAfter(signingTasks)
}