Browse Source

Fix publishing multiple platforms that use same alternative name (#1790)

-Pcompose.platforms=macos only matched MacosX64,
when it was expected to match both MacosX64 & MacosArm64
pull/1793/head
Alexey Tsvetkov 2 years ago committed by GitHub
parent
commit
6ba538c467
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      compose/buildSrc/src/main/kotlin/ComposePlatforms.kt

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

@ -48,9 +48,9 @@ enum class ComposePlatforms(vararg val alternativeNames: String) {
return ALL
}
val publication = ALL.firstOrNull { it.matches(name) }
if (publication != null) {
platforms.add(publication)
val matchingPlatforms = ALL.filter { it.matches(name) }
if (matchingPlatforms.isNotEmpty()) {
platforms.addAll(matchingPlatforms)
} else {
unknownNames.add(name)
}

Loading…
Cancel
Save