You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://androidweekly.net/issues/issue-583)[](https://mailchi.mp/kotlinweekly/kotlin-weekly-378)[](https://mailchi.mp/kotlinweekly/kotlin-weekly-389) <ahref="https://jetc.dev/issues/177.html"><imgsrc="https://img.shields.io/badge/As_Seen_In-jetc.dev_Newsletter_Issue_%23177-blue?logo=Jetpack+Compose&logoColor=white"alt="As Seen In - jetc.dev Newsletter Issue #177"></a> <ahref="https://jetc.dev/issues/188.html"><imgsrc="https://img.shields.io/badge/As_Seen_In-jetc.dev_Newsletter_Issue_%23188-blue?logo=Jetpack+Compose&logoColor=white"alt="As Seen In - jetc.dev Newsletter Issue #188"></a>
Copy file name to clipboardExpand all lines: kmp-composeuiviewcontroller-gradle-plugin/src/main/kotlin/com/github/guilhe/kmp/composeuiviewcontroller/gradle/KmpComposeUIViewControllerPlugin.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -313,7 +313,7 @@ public class KmpComposeUIViewControllerPlugin : Plugin<Project> {
Copy file name to clipboardExpand all lines: kmp-composeuiviewcontroller-ksp/src/main/kotlin/com/github/guilhe/kmp/composeuiviewcontroller/ksp/Processor.kt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -357,7 +357,8 @@ internal class Processor(
357
357
}
358
358
}
359
359
""".trimIndent()
360
-
val updatedCode = indentParameters(indentParameters(code, frameworks), letParameters)
360
+
val indentedCode = indentParameters(indentParameters(code, frameworks), letParameters)
361
+
val updatedCode = removeEmptyLineBetweenStructAndFunc(indentedCode)
Copy file name to clipboardExpand all lines: kmp-composeuiviewcontroller-ksp/src/main/kotlin/com/github/guilhe/kmp/composeuiviewcontroller/ksp/Utils.kt
+24-1Lines changed: 24 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -239,6 +239,28 @@ private fun removeAdjacentEmptyLines(list: List<String>): List<String> {
239
239
}.toList()
240
240
}
241
241
242
+
/**
243
+
* Removes empty lines between struct declaration and the first public func in generated Swift code
244
+
* when there are no parameters. This ensures proper formatting ([swiftformat](https://github.com/nicklockwood/SwiftFormat)) of the generated code.
0 commit comments