Skip to content

Commit 5396897

Browse files
build: update Dokka plugin
1 parent 64ba65a commit 5396897

7 files changed

Lines changed: 59 additions & 57 deletions

File tree

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
gradle/libs.versions.toml
4040
gradle/wrapper/gradle-wrapper.properties
4141
- name: Set up cross compilation
42-
run: sudo apt-get install -qy {binutils,gcc}-aarch64-linux-gnu
42+
run: sudo apt-get install -qy {binutils,gcc}-aarch64-linux-gnu gcc-mingw-w64-x86-64-posix
4343
- name: Get the cache versions
4444
id: versions
4545
shell: sh
@@ -58,13 +58,13 @@ jobs:
5858
path: ${{runner.tool_cache}}/konan/dependencies
5959
key: konan-${{runner.os}}-dependencies
6060
- name: Build documentation
61-
run: ./gradlew --no-daemon dokkaHtmlMultiModule
61+
run: ./gradlew --no-daemon dokkaGeneratePublicationHtml
6262
env:
6363
KONAN_DATA_DIR: ${{runner.tool_cache}}/konan
6464
- name: Upload pages artifact
6565
uses: actions/upload-pages-artifact@v3
6666
with:
67-
path: build/dokka/htmlMultiModule
67+
path: build/dokka/html
6868
- name: Deploy to GitHub Pages
6969
id: deployment
7070
uses: actions/deploy-pages@v4

.idea/ktlint-plugin.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,26 @@ subprojects {
2525
}
2626
}
2727

28+
dependencies {
29+
dokka(project(":kbigint"))
30+
dokka(project(":kbigint-serialization"))
31+
}
32+
2833
plugins.withType<NodeJsPlugin> {
2934
the<NodeJsEnvSpec>().download = false
3035
}
3136

32-
tasks.dokkaHtmlMultiModule {
37+
dokka {
3338
moduleName.set("KBigInt")
34-
includes.from("README.md")
35-
pluginsMapConfiguration.set(
36-
mapOf(
37-
"org.jetbrains.dokka.base.DokkaBase" to
38-
"""{"footerMessage": "(c) 2024 ObserverOfTime"}"""
39-
)
40-
)
39+
dokkaSourceSets.configureEach {
40+
includes.from("README.md")
41+
}
42+
pluginsConfiguration.html {
43+
footerMessage.set("(c) 2024-2025 ObserverOfTime")
44+
}
4145
}
4246

4347
tasks.wrapper {
44-
gradleVersion = "8.10"
48+
gradleVersion = "8.10.2"
4549
distributionType = Wrapper.DistributionType.BIN
4650
}

gradle.properties

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ org.gradle.welcome=never
1212
kotlin.code.style=official
1313
# Enables the new Android multiplatform sourceset layout.
1414
kotlin.mpp.androidSourceSetLayoutVersion=2
15-
# Enable C interop sharing
15+
# Enables C interop sharing
1616
kotlin.mpp.enableCInteropCommonization=true
17-
# Ignore disabled Kotlin/Native targets
17+
# Ignores disabled Kotlin/Native targets
1818
kotlin.native.ignoreDisabledTargets=true
19-
# Use npm instead of yarn
19+
# Uses npm instead of yarn
2020
kotlin.js.yarn=false
21+
# Enables Dokka V2 mode
22+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
23+
# Disables Dokka V2 warning
24+
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
2125

2226
# Enables the AndroidX package structure.
2327
android.useAndroidX=true

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

kbigint-serialization/build.gradle.kts

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import java.net.URL
2-
import org.gradle.internal.os.OperatingSystem
31
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
42

5-
val os: OperatingSystem = OperatingSystem.current()
6-
73
plugins {
84
`maven-publish`
95
signing
@@ -106,34 +102,33 @@ android {
106102
}
107103
}
108104

109-
tasks.dokkaHtmlPartial {
110-
moduleName.set("KBigInt Serialization")
111-
suppressInheritedMembers.set(false)
112-
pluginsMapConfiguration.set(
113-
mapOf(
114-
"org.jetbrains.dokka.base.DokkaBase" to
115-
"""{"footerMessage": "(c) 2025 ObserverOfTime"}"""
116-
)
117-
)
118-
dokkaSourceSets.configureEach {
119-
jdkVersion.set(17)
120-
includes.from(file("README.md"))
121-
externalDocumentationLink {
122-
url.set(URL("https://kotlinlang.org/api/kotlinx.serialization/"))
123-
}
124-
}
125-
}
126-
127105
tasks.withType<AbstractPublishToMaven>().configureEach {
128106
mustRunAfter(tasks.withType<Sign>())
129107
}
130108

131-
tasks.create<Jar>("javadocJar") {
109+
tasks.register<Jar>("javadocJar") {
132110
group = "documentation"
133111
archiveClassifier.set("javadoc")
134112
from(files("README.md"))
135113
}
136114

115+
dokka {
116+
moduleName.set("KBigInt Serialization")
117+
pluginsConfiguration.html {
118+
footerMessage.set("(c) 2024-2025 ObserverOfTime")
119+
}
120+
dokkaSourceSets.configureEach {
121+
jdkVersion.set(17)
122+
includes.from(file("README.md"))
123+
externalDocumentationLinks.register("kotlinx.serialization") {
124+
url("https://kotlinlang.org/api/kotlinx.serialization/")
125+
}
126+
}
127+
dokkaPublications.configureEach {
128+
suppressInheritedMembers.set(false)
129+
}
130+
}
131+
137132
publishing {
138133
publications.withType(MavenPublication::class) {
139134
artifact(tasks["javadocJar"])

kbigint/build.gradle.kts

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -320,32 +320,31 @@ if (os.isLinux) {
320320
}
321321
}
322322

323-
tasks.dokkaHtmlPartial {
324-
moduleName.set("KBigInt")
325-
suppressInheritedMembers.set(false)
326-
pluginsMapConfiguration.set(
327-
mapOf(
328-
"org.jetbrains.dokka.base.DokkaBase" to
329-
"""{"footerMessage": "(c) 2025 ObserverOfTime"}"""
330-
)
331-
)
332-
dokkaSourceSets.configureEach {
333-
jdkVersion.set(17)
334-
includes.from(file("README.md"))
335-
}
336-
}
337-
338323
tasks.withType<AbstractPublishToMaven>().configureEach {
339324
mustRunAfter(tasks.withType<Sign>())
340325
}
341326

342-
tasks.create<Jar>("javadocJar") {
327+
tasks.register<Jar>("javadocJar") {
343328
group = "documentation"
344329
group = "documentation"
345330
archiveClassifier.set("javadoc")
346331
from(files("README.md"))
347332
}
348333

334+
dokka {
335+
moduleName.set("KBigInt")
336+
pluginsConfiguration.html {
337+
footerMessage.set("(c) 2024-2025 ObserverOfTime")
338+
}
339+
dokkaSourceSets.configureEach {
340+
jdkVersion.set(17)
341+
includes.from(file("README.md"))
342+
}
343+
dokkaPublications.configureEach {
344+
suppressInheritedMembers.set(false)
345+
}
346+
}
347+
349348
publishing {
350349
publications.withType(MavenPublication::class) {
351350
artifact(tasks["javadocJar"])

0 commit comments

Comments
 (0)