fix(02-07): use kotlinx.coroutines.test.runTest in commonTest for wasmJs

- Add kotlinx-coroutines-test to commonTest dependencies in composeApp
- Refactor AuthSessionTest and LoginViewModelTest from runBlocking to runTest
  so the wasmJs test target compiles (runBlocking is JVM/Native-only)
- App.kt picks up spotless-imposed brace blocks under the auth-gate when
- Log pre-existing SecureAuthStateStoreContractTest and ios SecureAuthStateStore
  ktlint failures to deferred-items.md (out of scope per gsd scope-boundary rule)

Rule 3 (blocking): adding the multiplatform test runtime is needed so
./gradlew check on commonTest sources can compile across all KMP targets.
This commit is contained in:
2026-04-28 17:41:18 +02:00
parent 88f489800d
commit 570652c744
6 changed files with 103 additions and 94 deletions

View File

@@ -23,12 +23,21 @@ version = "1.0.0"
android {
namespace = "dev.ulfrx.recipe"
compileSdk = libs.versions.android.compileSdk.get().toInt()
compileSdk =
libs.versions.android.compileSdk
.get()
.toInt()
defaultConfig {
applicationId = "dev.ulfrx.recipe"
minSdk = libs.versions.android.minSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
minSdk =
libs.versions.android.minSdk
.get()
.toInt()
targetSdk =
libs.versions.android.targetSdk
.get()
.toInt()
versionCode = 1
versionName = "1.0"
@@ -71,7 +80,9 @@ kotlin {
isStatic = true
}
pod("AppAuth") {
version = libs.versions.appauth.ios.get()
version =
libs.versions.appauth.ios
.get()
}
}
@@ -104,6 +115,12 @@ kotlin {
implementation(libs.multiplatform.settings)
implementation(libs.multiplatform.settings.coroutines)
}
commonTest.dependencies {
// 02-07: kotlinx.coroutines.test.runTest is the multiplatform-safe
// alternative to runBlocking (which is JVM/Native-only and breaks the
// wasmJs test target). All commonTest coroutine tests use it.
implementation(libs.kotlinx.coroutinesTest)
}
androidMain.dependencies {
implementation(libs.compose.uiToolingPreview)
implementation(libs.androidx.activity.compose)