Add kotlin runtime modulemap for swift export as part of kotlin-native dist #KT-65673 fixed
Co-authored-by: Alexander Shabalin <alexander.shabalin@ashabalin.me> Merge-request: KT-MR-14493 Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
This commit is contained in:
+7
-1
@@ -16,6 +16,7 @@ import org.jetbrains.kotlin.konan.target.Distribution
|
||||
import org.jetbrains.kotlin.platform.konan.NativePlatforms
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.sir.SirModule
|
||||
import org.jetbrains.kotlin.sir.builder.SirImportBuilder
|
||||
import org.jetbrains.kotlin.sir.builder.buildImport
|
||||
import org.jetbrains.kotlin.sir.builder.buildModule
|
||||
import org.jetbrains.kotlin.swiftexport.standalone.SwiftExportInput
|
||||
@@ -68,6 +69,9 @@ internal fun buildSwiftModule(
|
||||
declarations += buildImport {
|
||||
moduleName = bridgeModuleName
|
||||
}
|
||||
declarations += buildImport {
|
||||
moduleName = KOTLIN_RUNTIME_MODULE_NAME
|
||||
}
|
||||
ktFiles.forEach { file ->
|
||||
declarations += buildSirDeclarationList(file)
|
||||
}
|
||||
@@ -75,4 +79,6 @@ internal fun buildSwiftModule(
|
||||
declarations.forEach { it.parent = this }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private const val KOTLIN_RUNTIME_MODULE_NAME: String = "KotlinRuntime"
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
import KotlinBridges
|
||||
import KotlinRuntime
|
||||
|
||||
/**
|
||||
* Function foo description
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
import KotlinBridges
|
||||
import KotlinRuntime
|
||||
|
||||
public enum namespace1 {
|
||||
public enum local_functions {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
import KotlinBridges
|
||||
import KotlinRuntime
|
||||
|
||||
public func meaningOfLife() -> Swift.Int32 {
|
||||
return __root___meaningOfLife()
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
import KotlinBridges
|
||||
import KotlinRuntime
|
||||
|
||||
public enum namespace {
|
||||
public enum main {
|
||||
|
||||
Reference in New Issue
Block a user