File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
native/swift/swift-export-standalone/src/org/jetbrains/kotlin/swiftexport/standalone Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,8 @@ private fun writeRuntimeSupportModule(
203203
204204 val runtimeSupportContent = config.javaClass.getResource(" /swift/KotlinRuntimeSupport.swift" )?.readText()
205205 ? : error(" Can't find runtime support module" )
206- dumpTextAtFile(sequenceOf(runtimeSupportContent), outputPath.toFile())
206+ // arrayOf() used as workaround to target method from older kotlin-stlib due to https://github.com/gradle/gradle/issues/34442
207+ dumpTextAtFile(sequenceOf(* arrayOf(runtimeSupportContent)), outputPath.toFile())
207208
208209 return SwiftExportModule .SwiftOnly (
209210 swiftApi = outputPath,
@@ -213,7 +214,8 @@ private fun writeRuntimeSupportModule(
213214}
214215
215216private fun TranslationResult.writeModule (config : SwiftExportConfig ): SwiftExportModule {
216- val swiftSources = sequenceOf(swiftModuleSources) + moduleConfig.unsupportedDeclarationReporter.messages.map { " // $it " }
217+ // arrayOf() used as workaround to target method from older kotlin-stlib due to https://github.com/gradle/gradle/issues/34442
218+ val swiftSources = sequenceOf(* arrayOf(swiftModuleSources)) + moduleConfig.unsupportedDeclarationReporter.messages.map { " // $it " }
217219 val modulePath = config.outputPath / swiftModuleName
218220 val outputFiles = SwiftExportFiles (
219221 swiftApi = (modulePath / " $swiftModuleName .swift" ),
You can’t perform that action at this time.
0 commit comments