Skip to content

Commit

Permalink
Unify runtime-saveable's targets with the runtime
Browse files Browse the repository at this point in the history
It supports more targets than the general compose multiplatform libraries, and the two should be unified.

Test: gw :compose:runtime:runtime-saveable:watchosArm64Binaries :compose:runtime:runtime-saveable:watchosArm32Binaries :compose:runtime:runtime-saveable:watchosX86Binaries :compose:runtime:runtime-saveable:watchosX64Binaries :compose:runtime:runtime-saveable:watchosSimulatorArm64Binaries :compose:runtime:runtime-saveable:tvosArm64Binaries :compose:runtime:runtime-saveable:tvosX64Binaries :compose:runtime:runtime-saveable:tvosSimulatorArm64Binaries :compose:runtime:runtime-saveable:mingwX64Binaries :compose:runtime:runtime-saveable:linuxX64Binaries
  • Loading branch information
JakeWharton committed Nov 9, 2023
1 parent 296fcc4 commit 2a70f0b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions compose/runtime/runtime-saveable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,21 @@ if(AndroidXComposePlugin.isMultiplatformEnabled(project)) {
}

kotlin {
// Not all modules can have these targets, so declare them here instead of androidXComposeMultiplatform.
// We can support the kotlin-native targets supported by kotlin coroutines:
// https://github.com/Kotlin/kotlinx.coroutines/blob/master/gradle/compile-native-multiplatform.gradle
// NOTE: Keep this list in sync with runtime's targets.
watchosArm64()
watchosArm32()
watchosX86()
watchosX64()
watchosSimulatorArm64()
tvosArm64()
tvosX64()
tvosSimulatorArm64()
mingwX64()
linuxX64()

/* When updating dependencies, make sure to make the an an analogous update in the
corresponding block above */
sourceSets {
Expand Down
1 change: 1 addition & 0 deletions compose/runtime/runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ if(AndroidXComposePlugin.isMultiplatformEnabled(project)) {
// Not all modules can have these targets, so declare them here instead of androidXComposeMultiplatform.
// We can support the kotlin-native targets supported by kotlin coroutines:
// https://github.com/Kotlin/kotlinx.coroutines/blob/master/gradle/compile-native-multiplatform.gradle
// NOTE: Keep this list in sync with runtime-saveable's targets.
watchosArm64()
watchosArm32()
watchosX86()
Expand Down
2 changes: 1 addition & 1 deletion mpp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ val mainComponents =
ComposeComponent(":compose:material:material-icons-core"),
ComposeComponent(":compose:material:material-ripple"),
ComposeComponent(":compose:runtime:runtime", supportedPlatforms = ComposePlatforms.ALL),
ComposeComponent(":compose:runtime:runtime-saveable"),
ComposeComponent(":compose:runtime:runtime-saveable", supportedPlatforms = ComposePlatforms.ALL),
ComposeComponent(":compose:ui:ui"),
ComposeComponent(":compose:ui:ui-geometry"),
ComposeComponent(":compose:ui:ui-graphics"),
Expand Down

0 comments on commit 2a70f0b

Please sign in to comment.