-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
112 lines (102 loc) · 2.53 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
plugins {
kotlin("multiplatform") version "2.0.20"
id("org.jetbrains.kotlinx.kover") version "0.8.3"
id("com.google.devtools.ksp") version "2.0.20-1.0.24"
id("com.vanniktech.maven.publish") version "0.28.0"
id("dev.petuska.npm.publish") version "3.4.1"
}
group = "dev.makth"
version = "1.3.1"
repositories {
mavenCentral()
}
mavenPublishing {
publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
pom {
name.set("makth")
description.set("A Kotlin library for algebra")
url.set("https://github.com/nathanfallet/makth")
licenses {
license {
name.set("GPL-3.0")
url.set("https://opensource.org/licenses/GPL-3.0")
}
}
developers {
developer {
id.set("NathanFallet")
name.set("Nathan Fallet")
email.set("contact@nathanfallet.me")
url.set("https://www.nathanfallet.me")
}
}
scm {
url.set("https://github.com/nathanfallet/makth.git")
}
}
}
kotlin {
// Tiers are in accordance with <https://kotlinlang.org/docs/native-target-support.html>
// Tier 1
macosX64()
macosArm64()
iosSimulatorArm64()
iosX64()
// Tier 2
linuxX64()
linuxArm64()
watchosSimulatorArm64()
watchosX64()
watchosArm32()
watchosArm64()
tvosSimulatorArm64()
tvosX64()
tvosArm64()
iosArm64()
// Tier 3
mingwX64()
watchosDeviceArm64()
// jvm & js
jvmToolchain(21)
jvm {
withJava()
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}
js {
binaries.library()
nodejs()
browser()
//generateTypeScriptDefinitions() // Not supported for now because of collections etc...
}
applyDefaultHierarchyTemplate()
sourceSets {
all {
languageSettings.apply {
optIn("kotlin.js.ExperimentalJsExport")
}
}
val commonMain by getting {
dependencies {
api("dev.kaccelero:core:0.3.0")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
}
}
npmPublish {
readme.set(file("README.md"))
registries {
register("npmjs") {
uri.set("https://registry.npmjs.org")
}
}
}