rcd27
12/01/2022, 11:00 PMdecompose
samples. Check this out, compiler complains, however build is OK and I actually can get the instance during runtime. The build.kts for this module is:
...
sourceSets {
all {
languageSettings.apply {
optIn("kotlin.RequiresOptIn")
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
optIn("org.jetbrains.compose.ExperimentalComposeLibrary")
}
}
val androidMain by getting {
dependencies {
api("androidx.appcompat:appcompat:1.5.1")
implementation("androidx.compose.material3:material3:1.1.0-alpha02")
implementation("androidx.compose.material3:material3-window-size-class:1.1.0-alpha02")
}
}
val commonMain by getting {
dependencies {
implementation(project(":shared"))
api(compose.runtime)
api(compose.foundation)
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
api(compose.material3)
// Decompose
implementation("com.arkivanov.decompose:decompose:1.0.0-beta-01")
// Value<T>.subscribeAsState()
implementation("com.arkivanov.decompose:extensions-compose-jetbrains:1.0.0-beta-01")
}
}
val jvmMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
}
}
}
...
rcd27
12/01/2022, 11:02 PMrcd27
12/01/2022, 11:04 PMsubscribeAsState()
and use it both in android
and desktop
apprcd27
12/01/2022, 11:07 PMcommonMain
"doesn't see" extensions
dependency. But it should be there.Arkadii Ivanov
12/01/2022, 11:10 PMrcd27
12/01/2022, 11:16 PMandroidMain
, commonMain
and jvmMain
Arkadii Ivanov
12/01/2022, 11:20 PMArkadii Ivanov
12/01/2022, 11:24 PMrcd27
12/01/2022, 11:27 PMrcd27
12/01/2022, 11:28 PMArkadii Ivanov
12/01/2022, 11:32 PMrcd27
12/01/2022, 11:33 PM