diff options
Diffstat (limited to 'dokka-integration-tests/gradle/projects/it-wasm-basic/build.gradle.kts')
-rw-r--r-- | dokka-integration-tests/gradle/projects/it-wasm-basic/build.gradle.kts | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dokka-integration-tests/gradle/projects/it-wasm-basic/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-wasm-basic/build.gradle.kts new file mode 100644 index 00000000..251d1b8f --- /dev/null +++ b/dokka-integration-tests/gradle/projects/it-wasm-basic/build.gradle.kts @@ -0,0 +1,51 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.dokka.gradle.DokkaTask +import java.net.URL + +plugins { + kotlin("multiplatform") + id("org.jetbrains.dokka") +} + +apply(from = "../template.root.gradle.kts") + +repositories { + // Remove it when wasm target will be published into public maven repository + maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental") +} + +kotlin { + wasm() + sourceSets { + val wasmMain by getting { + dependencies { + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4-wasm1") + implementation("org.jetbrains.kotlinx:atomicfu-wasm:0.18.5-wasm1") + } + } + } +} + +tasks.withType<DokkaTask>().configureEach { + dokkaSourceSets { + configureEach { + externalDocumentationLink { + url.set(URL("https://kotlinlang.org/api/kotlinx.coroutines/")) + } + } + } +} + +// HACK: some dependencies (coroutines -wasm0 and atomicfu -wasm0) reference deleted *-dev libs +configurations.all { + val conf = this + resolutionStrategy.eachDependency { + if (requested.version == "1.8.20-dev-3308") { + println("Substitute deleted version ${requested.module}:${requested.version} for ${conf.name}") + useVersion(project.properties["dokka_it_kotlin_version"] as String) + } + } +} |