@@ -25,35 +25,38 @@ if (platform == "jvm") {
2525 }
2626
2727 if (project. name == coroutines_core) {
28- // Configuration for MPP module
28+ // Custom configuration for MPP modules
29+ dependencies {
30+ compileOnly project(" :js-stub" ) // so that JS library reference can resolve properly
31+ }
32+
2933 dokka {
3034 kotlinTasks { [] }
3135 suppressedModifiers = [' actual' ]
3236 // map for JS & Common sources
3337 makeLinkMapping(it, projectDir)
34- makeLinkMapping(it, rootProject. file(' js/kotlinx-coroutines-core-js ' ))
35- makeLinkMapping(it, rootProject. file(' common/kotlinx-coroutines-core- common' ))
38+ makeLinkMapping(it, rootProject. file(" js/$p roject . name -js " ))
39+ makeLinkMapping(it, rootProject. file(" common/$p roject . name - common" ))
3640 // source roots
3741 impliedPlatforms = [' JVM' , ' JS' ]
3842 sourceRoot {
39- path = rootProject. file(' core/kotlinx-coroutines-core /src/main/kotlin' )
43+ path = rootProject. file(" core/$p roject . name /src/main/kotlin" )
4044 platforms = [' JVM' ]
4145 }
4246 sourceRoot {
43- path = rootProject. file(' js/kotlinx-coroutines-core- js/src/main/kotlin' )
47+ path = rootProject. file(" js/$p roject . name - js/src/main/kotlin" )
4448 platforms = [' JS' ]
4549 }
4650 sourceRoot {
47- path = rootProject. file(' common/kotlinx-coroutines-core- common/src/main/kotlin' )
51+ path = rootProject. file(" common/$p roject . name - common/src/main/kotlin" )
4852 }
4953 // depends on JS & Common, too
5054 afterEvaluate {
51- dependsOn(tasks. getByPath(" :kotlinx-coroutines-core-js:classes" ))
52- dependsOn(tasks. getByPath(" :kotlinx-coroutines-core-common:classes" ))
53- }
54- afterEvaluate {
55- classpath = project. configurations. compileClasspath. files
55+ dependsOn(tasks. getByPath(" :$project . name -js:classes" ))
56+ dependsOn(tasks. getByPath(" :$project . name -common:classes" ))
57+ // dependsOn(tasks.getByPath(":js-stub:classes"))
5658 dependsOn(project. configurations. compileClasspath)
59+ classpath = project. configurations. compileClasspath. files
5760 }
5861 }
5962 }
0 commit comments