Browse Source

Add NO_SKIKO platforms set in ComposePlatforms (#2307)

* Add NO_SKIKO platforms set in ComposePlatforms

They can be used to build and publish compose-runtime.
Other compose modules can't be built for NO_SKIKO since those platforms are not supported by skiko yet.

* Fix typi

Co-authored-by: dima.avdeev <99798741+dima-avdeev-jb@users.noreply.github.com>

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
Co-authored-by: dima.avdeev <99798741+dima-avdeev-jb@users.noreply.github.com>
pull/2266/merge
Oleksandr Karpovich 2 years ago committed by GitHub
parent
commit
177ad3b526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      compose/build.gradle.kts
  2. 2
      compose/buildSrc/src/main/kotlin/ComposeComponent.kt
  3. 27
      compose/buildSrc/src/main/kotlin/ComposePlatforms.kt

2
compose/build.gradle.kts

@ -28,7 +28,7 @@ val mainComponents =
ComposeComponent(":compose:material3:material3"),
ComposeComponent(":compose:material:material-icons-core"),
ComposeComponent(":compose:material:material-ripple"),
ComposeComponent(":compose:runtime:runtime"),
ComposeComponent(":compose:runtime:runtime", supportedPlatforms = ComposePlatforms.ALL),
ComposeComponent(":compose:runtime:runtime-saveable"),
ComposeComponent(":compose:ui:ui"),
ComposeComponent(":compose:ui:ui-geometry"),

2
compose/buildSrc/src/main/kotlin/ComposeComponent.kt

@ -5,5 +5,5 @@
data class ComposeComponent(
val path: String,
val supportedPlatforms: Set<ComposePlatforms> = ComposePlatforms.ALL
val supportedPlatforms: Set<ComposePlatforms> = ComposePlatforms.ALL - ComposePlatforms.NO_SKIKO
)

27
compose/buildSrc/src/main/kotlin/ComposePlatforms.kt

@ -15,7 +15,18 @@ enum class ComposePlatforms(vararg val alternativeNames: String) {
MacosArm64("Macos"),
UikitX64("UiKit"),
UikitArm64("UiKit"),
UikitSimArm64("UiKit");
UikitSimArm64("UiKit"),
TvosArm64("TvOs"),
TvosX64("TvOs"),
TvosSimulatorArm64("TvOs"),
WatchosArm64("WatchOs"),
WatchosArm32("WatchOs"),
WatchosX86("WatchOs"),
WatchosX64("WatchOs"),
WatchosSimulatorArm64("WatchOs"),
LinuxX64("Linux"),
MingwX64("Mingw"),
;
fun matches(nameCandidate: String): Boolean =
listOf(name, *alternativeNames).any { it.equals(nameCandidate, ignoreCase = true) }
@ -34,6 +45,20 @@ enum class ComposePlatforms(vararg val alternativeNames: String) {
ComposePlatforms.AndroidRelease
)
// These platforms are not supported by skiko yet
val NO_SKIKO = EnumSet.of(
ComposePlatforms.TvosArm64,
ComposePlatforms.TvosX64,
ComposePlatforms.TvosSimulatorArm64,
ComposePlatforms.WatchosArm64,
ComposePlatforms.WatchosArm32,
ComposePlatforms.WatchosX86,
ComposePlatforms.WatchosX64,
ComposePlatforms.WatchosSimulatorArm64,
ComposePlatforms.LinuxX64,
ComposePlatforms.MingwX64,
)
/**
* Maps comma separated list of platforms into a set of [ComposePlatforms]
* The function is case- and whitespace-insensetive.

Loading…
Cancel
Save