-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
95 lines (78 loc) · 2.2 KB
/
build.gradle.kts
File metadata and controls
95 lines (78 loc) · 2.2 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
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
plugins {
kotlin("multiplatform") version "2.2.0"
id("org.jetbrains.dokka") version "2.0.0"
id("com.vanniktech.maven.publish") version "0.36.0"
}
val GROUP: String by project
val VERSION_NAME: String by project
group = GROUP
version = VERSION_NAME
repositories {
mavenCentral()
}
kotlin {
jvm()
js {
browser()
nodejs()
}
@OptIn(ExperimentalWasmDsl::class)
wasmJs { browser() }
// Tier 1
macosArm64()
iosArm64()
iosSimulatorArm64()
// Tier 2
linuxX64()
macosX64()
iosX64()
watchosArm64()
watchosDeviceArm64()
watchosSimulatorArm64()
watchosX64()
// Tier 3
androidNativeArm64()
mingwX64 {
binaries.findTest(DEBUG)!!.linkerOpts = mutableListOf("-Wl,--subsystem,windows")
}
sourceSets {
commonMain {
dependencies {
implementation(kotlin("stdlib-common"))
}
}
commonTest {
dependencies {
implementation(kotlin("test"))
}
}
}
}
dokka {
dokkaSourceSets.configureEach {
reportUndocumented.set(false)
skipEmptyPackages.set(true)
skipDeprecated.set(true)
jdkVersion.set(8)
// Add Android SDK packages
enableAndroidDocumentationLink.set(true)
sourceLink {
localDirectory.set(project.file("src/commonMain/kotlin"))
// URL showing where the source code can be accessed through the web browser
remoteUrl.set(uri("https://github.com/romainguy/kotlin-math/blob/main/${project.name}/src/commonMain/kotlin"))
// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#L")
}
}
}
val dokkaGeneratePublicationHtml by tasks.getting(org.jetbrains.dokka.gradle.tasks.DokkaGeneratePublicationTask::class)
val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
dependsOn(dokkaGeneratePublicationHtml)
archiveClassifier.set("javadoc")
from(dokkaGeneratePublicationHtml.outputDirectory)
}
mavenPublishing {
publishToMavenCentral()
signAllPublications()
}