Add a dependency from all klib-originated modules to the main module
This is required, for instance, to properly resolve supertypes across the modules. Issue #KT-37832 Fixed
This commit is contained in:
+5
@@ -69,6 +69,11 @@ class KlibBasedMppIT : BaseGradleIT() {
|
||||
|
||||
private fun testBuildWithDependency(configureDependency: Project.() -> Unit) = with(Project("common-klib-lib-and-app")) {
|
||||
embedProject(Project("common-klib-lib-and-app"), renameTo = dependencyModuleName)
|
||||
|
||||
projectDir.resolve("$dependencyModuleName/src/commonMain/kotlin/TestKt37832.kt").writeText(
|
||||
"package com.example.test.kt37832" + "\n" + "class MyException : RuntimeException()"
|
||||
)
|
||||
|
||||
gradleBuildScript().modify(::transformBuildScriptWithPluginsDsl)
|
||||
|
||||
projectDir.resolve(dependencyModuleName + "/src").walkTopDown().filter { it.extension == "kt" }.forEach { file ->
|
||||
|
||||
+4
-1
@@ -15,4 +15,7 @@ fun libCommonMainInternalFun() = Unit
|
||||
|
||||
fun main() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/** Test KT-37832 */
|
||||
class MyCustomException : RuntimeException()
|
||||
+3
@@ -5,6 +5,9 @@ actual class LibCommonMainExpect : LibCommonMainIface {
|
||||
println("actualized in jvmAndJsMain")
|
||||
libCommonMainTopLevelFun()
|
||||
libCommonMainInternalFun()
|
||||
|
||||
/** Test KT-37832 */
|
||||
throw MyCustomException()
|
||||
}
|
||||
|
||||
fun additionalFunInJvmAndJsActual() {
|
||||
|
||||
+3
@@ -13,6 +13,9 @@ actual class LibCommonMainExpect : LibCommonMainIface {
|
||||
libCommonMainTopLevelFun()
|
||||
println(CArrayPointer::class)
|
||||
libCommonMainInternalFun()
|
||||
|
||||
/** Test KT-37832 */
|
||||
throw MyCustomException()
|
||||
}
|
||||
|
||||
fun additionalFunInLinuxActual() {
|
||||
|
||||
Reference in New Issue
Block a user