Skip to content

Commit d8d9843

Browse files
committed
Fix dokka configuration for new mpp
1 parent f5e5412 commit d8d9843

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ configure(subprojects.findAll { !sourceless.contains(it.name) && it.name != "ben
122122
}
123123
}
124124

125-
// TODO
126125
def core_docs_url = "https://kotlin.github.io/kotlinx.coroutines/$coreModule/"
127126
//def core_docs_url = "http://127.0.0.1:4000/kotlinx.coroutines/$coreModule/"
128127
def core_docs_file = "$projectDir/kotlinx-coroutines-core/build/dokka/kotlinx-coroutines-core/package-list"

gradle/dokka.gradle

+10-4
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,22 @@ if (project.name == "kotlinx-coroutines-core") {
4848
// Custom configuration for MPP modules
4949
dependencies {
5050
dokkaStubs project(":js-stub") // so that JS library reference can resolve properly
51+
dokkaStubs project(":kotlinx-coroutines-core")
5152
}
5253

5354
dokka {
5455
kotlinTasks { [] }
5556
suppressedModifiers = ['actual']
56-
// map for JS, Native, and Common sources
5757
makeLinkMapping(it, projectDir)
58-
makeLinkMapping(it, rootProject.file("$project.name"))
58+
makeLinkMapping(it, project.file("js"))
59+
makeLinkMapping(it, project.file("jvm"))
60+
makeLinkMapping(it, project.file("native"))
61+
makeLinkMapping(it, project.file("common"))
5962
// source roots
6063
impliedPlatforms = ['JVM', 'JS', 'Native']
64+
sourceRoot {
65+
path = rootProject.file("$project.name/common/src")
66+
}
6167
sourceRoot {
6268
path = rootProject.file("$project.name/jvm/src")
6369
platforms = ['JVM']
@@ -70,8 +76,8 @@ if (project.name == "kotlinx-coroutines-core") {
7076
path = rootProject.file("$project.name/native/src")
7177
platforms = ['Native']
7278
}
73-
sourceRoot {
74-
path = rootProject.file("$project.name/common/src")
79+
doFirst {
80+
classpath = project.configurations.dokkaStubs.files + project.configurations.jvmCompileClasspath.files + project.kotlin.targets.jvm.compilations.main.output.allOutputs
7581
}
7682
}
7783
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)