Skip to content

Adopt Kotlin/Dokka 2.x migrations #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ gradle-app.setting
### Gradle Patch ###
**/build/
kotlin-js-store
.kotlin/
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import com.vanniktech.maven.publish.KotlinMultiplatform
import org.gradle.api.tasks.testing.Test
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.dsl.JsModuleKind
import org.jetbrains.kotlin.konan.target.HostManager

plugins {
Expand All @@ -23,7 +24,7 @@ apiValidation { ignoredProjects.add("benchmark") }
mavenPublishing {
signAllPublications()
pomFromGradleProperties()
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaHtml")))
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaGenerate")))
}

publishing {
Expand Down Expand Up @@ -64,7 +65,7 @@ kotlin {
js(IR) {
nodejs {}
browser {}
compilations.configureEach { kotlinOptions { moduleKind = "umd" } }
compilerOptions { moduleKind.set(JsModuleKind.MODULE_UMD) }
}
if (providers.gradleProperty("enableNativeTargets").isPresent) {
if (HostManager.hostIsMac) {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ POM_DEVELOPER_NAME=The Android Password Store Authors
[email protected]

SONATYPE_HOST=
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
benchmark = "0.4.13"
kotlin = "2.1.10"
kotlin = "2.1.20"
dokka = "2.0.0"

[libraries]
Expand Down
17 changes: 7 additions & 10 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import org.jetbrains.kotlin.gradle.dsl.JsModuleKind
import org.jetbrains.kotlin.gradle.dsl.JsSourceMapEmbedMode
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithHostTests
import org.jetbrains.kotlin.konan.target.HostManager

plugins {
application
kotlin("multiplatform")
}
plugins { kotlin("multiplatform") }

fun KotlinNativeTargetWithHostTests.configureTarget() = binaries {
executable { entryPoint = "main" }
Expand All @@ -15,12 +14,10 @@ kotlin {
browser()
nodejs()
binaries.executable()
compilations.all {
kotlinOptions {
moduleKind = "umd"
sourceMap = true
sourceMapEmbedSources = null
}
compilerOptions {
moduleKind.set(JsModuleKind.MODULE_UMD)
sourceMap.set(true)
sourceMapEmbedSources.set(JsSourceMapEmbedMode.SOURCE_MAP_SOURCE_CONTENT_NEVER)
}
}
if (providers.gradleProperty("enableNativeTargets").isPresent) {
Expand Down
Loading