JPS: exclude source roots from other targets

Previously `findJavaRootDescriptor` was return source root for random
module. This cause build errors for mpp (same file may appear in
multiple source roots of common and platform modules)

#KT-28988 Fixed
This commit is contained in:
Sergey Rostov
2019-01-10 16:23:08 +03:00
parent 8a0057b387
commit 75e59fdc46
7 changed files with 61 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
c [sourceSetHolder]
pJvm [compilationAndSourceSetHolder, jvm]
pJvm -> c [include]

View File

@@ -0,0 +1,14 @@
================ Step #1 =================
Building c
Building pJvm
Cleaning output files:
out/production/pJvm/FJvmKt.class
out/production/pJvm/META-INF/pJvm.kotlin_module
End of files
Compiling files:
c/src/f.kt
pJvm/src/fJvm.kt
End of files
Exit code: OK
------------------------------------------

View File

@@ -0,0 +1,9 @@
expect fun f()
@ExperimentalMultiplatform
@OptionalExpectation
internal expect annotation class SharedImmutable()
@ExperimentalMultiplatform
@SharedImmutable
val UNDEFINED = 1

View File

@@ -0,0 +1,3 @@
actual fun f() = Unit
fun x() = 1

View File

@@ -0,0 +1,3 @@
actual fun f() = Unit
fun x() = 2