-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle.kts
54 lines (46 loc) · 1.17 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
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
plugins {
kotlin("multiplatform") version "1.9.24"
`maven-publish`
signing
}
afterEvaluate {
publishing {
repositories {
configureMavenPublication(this, project)
}
publications.forEach {
it as MavenPublication
it.pom.configureMavenCentralMetadata(project)
signPublicationIfKeyPresent(project, it)
}
tasks.withType<AbstractPublishToMaven>().configureEach {
dependsOn(tasks.withType<Sign>())
}
}
}
repositories {
mavenCentral()
}
val artifactId = "kotlinx-browser"
val deployVersion = properties["deployVersion"]?.toString()
val versionSuffix = properties["versionSuffix"]?.toString()
if (!deployVersion.isNullOrBlank()) {
version = "$version-$deployVersion"
}
if (!versionSuffix.isNullOrBlank()) {
version = "$version-$versionSuffix"
}
kotlin {
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
nodejs()
}
sourceSets {
val wasmJsTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
}
}