feat(01-04): wire JVM + Wasm main + Swift iOSApp to bootstrap Koin + Kermit

- Desktop main() calls configureLogging() → initKoin() before application { Window { App() } }
- Wasm main() calls configureLogging() → initKoin() before ComposeViewport { App() } (PITFALL #8 future-proof)
- iOSApp.swift imports ComposeApp and calls KoinIosKt.doInitKoin() in init() — single iOS call site (PITFALL #4)
- MainViewController.kt and App.kt unmodified (anti-pattern guards)
This commit is contained in:
2026-04-24 18:22:47 +02:00
parent 4e6192293f
commit 37f6191523
3 changed files with 23 additions and 8 deletions

View File

@@ -2,12 +2,18 @@ package dev.ulfrx.recipe
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
import dev.ulfrx.recipe.di.initKoin
import dev.ulfrx.recipe.logging.configureLogging
fun main() = application {
Window(
onCloseRequest = ::exitApplication,
title = "recipe",
) {
App()
fun main() {
configureLogging()
initKoin()
application {
Window(
onCloseRequest = ::exitApplication,
title = "recipe",
) {
App()
}
}
}
}