CLOVIS
09/10/2021, 9:00 PMcompose.foundation
and compose.material
not available yet for JS? Gradle refuses to build if I put them in commonMain
, saying the JS IR variants are missing.Big Chungus
09/10/2021, 9:05 PMBig Chungus
09/10/2021, 9:06 PMCLOVIS
09/10/2021, 9:16 PMCLOVIS
09/10/2021, 9:17 PMBig Chungus
09/10/2021, 9:17 PMBig Chungus
09/10/2021, 9:17 PMBig Chungus
09/10/2021, 9:18 PMBig Chungus
09/10/2021, 9:18 PMCLOVIS
09/10/2021, 9:27 PMCLOVIS
09/10/2021, 9:29 PMval commonMain by getting {
dependencies {
api(project(":core")) // other module with my business model
api(compose.runtime)
}
}
val jvmMain by getting {
dependencies {
api(compose.desktop.currentOs)
api(compose.foundation)
api(compose.material)
implementation(compose.preview)
}
}
val jsMain by getting {
dependencies {
api(compose.web.core)
}
}
This works fine, however since commonMain
depends only on compose.runtime
I can use @Composable
in common code, but not Text
or any other standard UI composables.CLOVIS
09/10/2021, 9:43 PMCLOVIS
09/10/2021, 10:01 PMcompose.web.widgets
.Scott Kruse
09/11/2021, 9:08 AMcompose.foundation
Scott Kruse
09/11/2021, 9:08 AMCould not determine the dependencies of task ':web:jsPackageJson'.
> Could not resolve all dependencies for configuration ':web:jsNpm'.
> Could not resolve org.jetbrains.compose.foundation:foundation:1.0.0-alpha3.
Required by:
project :web > project :common
>
Big Chungus
09/11/2021, 9:12 AMScott Kruse
09/11/2021, 9:18 AMjs(IR) {
browser()
binaries.executable()
}
CLOVIS
09/11/2021, 10:08 AMCLOVIS
09/11/2021, 10:09 AMBig Chungus
09/11/2021, 11:00 AMCLOVIS
09/11/2021, 11:27 AMBig Chungus
09/11/2021, 12:00 PMScott Kruse
09/11/2021, 2:33 PMScott Kruse
09/11/2021, 2:37 PMThey are available for both Android and Desktop, however.Yeah I was able to reuse common module button composables on desktop, pretty awesome
Big Chungus
09/11/2021, 3:15 PM