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
This commit is contained in:
Alexey Tsvetkov
2022-02-04 11:25:28 +03:00
committed by GitHub
parent e1d0a39cf4
commit 6ba538c467

View File

@@ -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)
}