Skip to content

Commit b584d32

Browse files
committed
fixes of Dokka docs publishing
1 parent 0c886c3 commit b584d32

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

build.gradle.kts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,15 @@ repositories {
4848

4949
kotlin {
5050

51+
5152
js(IR) {
5253
compilations.all {
5354
kotlinOptions.moduleKind = "commonjs"
5455
}
5556

5657
useCommonJs()
5758
nodejs {
58-
version = libs.versions.node.js.get()
59+
kotlinNodeJsEnvSpec.version.set(libs.versions.node.js.get())
5960
testTask {
6061
// debug=true
6162
}
@@ -103,6 +104,12 @@ kotlin {
103104
}
104105
}
105106

107+
val javadocJar = tasks.register<Jar>("javadocJar") {
108+
dependsOn(tasks.dokkaGenerate.get())
109+
archiveClassifier.set("javadoc")
110+
from(layout.buildDirectory.dir("dokka/html"))
111+
}
112+
106113
publishing {
107114

108115
publications {
@@ -115,7 +122,7 @@ kotlin {
115122

116123

117124
withType<MavenPublication> {
118-
artifact(layout.buildDirectory.dir("dokka"))
125+
artifact(javadocJar)
119126

120127
pom {
121128
name.set("node-sqlite3-driver")

0 commit comments

Comments
 (0)