@@ -17,57 +17,67 @@ import SPIManifest
1717
1818extension Build {
1919 enum Platform : String , Codable , Equatable , CaseIterable {
20+ case android
2021 case iOS = " ios "
2122 case linux
2223 case macosSpm = " macos-spm "
2324 case macosXcodebuild = " macos-xcodebuild "
2425 case tvOS = " tvos "
2526 case visionOS = " visionos "
27+ case wasm
2628 case watchOS = " watchos "
2729
2830 var name : String {
2931 switch self {
32+ case . android:
33+ return " Android "
3034 case . iOS:
3135 return " iOS "
36+ case . linux:
37+ return " Linux "
3238 case . macosSpm:
3339 return " macOS - SPM "
3440 case . macosXcodebuild:
3541 return " macOS - xcodebuild "
3642 case . tvOS:
3743 return " tvOS "
44+ case . wasm:
45+ return " Wasm "
3846 case . watchOS:
3947 return " watchOS "
4048 case . visionOS:
4149 return " visionOS "
42- case . linux:
43- return " Linux "
4450 }
4551 }
4652
4753 var displayName : String {
4854 switch self {
55+ case . android:
56+ return " Android "
4957 case . iOS:
5058 return " iOS "
59+ case . linux:
60+ return " Linux "
5161 case . macosSpm:
5262 return " macOS (SPM) "
5363 case . macosXcodebuild:
5464 return " macOS (Xcode) "
5565 case . tvOS:
5666 return " tvOS "
67+ case . wasm:
68+ return " Wasm "
5769 case . watchOS:
5870 return " watchOS "
5971 case . visionOS:
6072 return " visionOS "
61- case . linux:
62- return " Linux "
6373 }
6474 }
6575
6676 /// Currently supported build platforms
6777 static var allActive : [ Self ] {
6878 // The order of this array defines the platform order on the BuildIndex page. Keep this aliged with the
6979 // order in GetRoute.Model.PlatformResults (which is the order in the build matrix on the PackageShow page).
70- let active : [ Self ] = [ . iOS, . macosSpm, . macosXcodebuild, . visionOS, . tvOS, . watchOS, . linux]
80+ let active : [ Self ] = [ . iOS, . macosSpm, . macosXcodebuild, . visionOS, . tvOS, . watchOS, . linux, . wasm , . android ]
7181 assert ( active. count == allCases. count, " mismatch in Build.Platform and active platform count " )
7282 return active
7383 }
@@ -78,6 +88,8 @@ extension Build {
7888 /// - Parameter spiManifestPlatform: SPIManifest platform
7989 private init ( _ spiManifestPlatform: SPIManifest . Platform ) {
8090 switch spiManifestPlatform {
91+ case . android:
92+ self = . android
8193 case . iOS:
8294 self = . iOS
8395 case . linux:
@@ -90,6 +102,8 @@ extension Build {
90102 self = . tvOS
91103 case . visionOS:
92104 self = . visionOS
105+ case . wasm:
106+ self = . wasm
93107 case . watchOS:
94108 self = . watchOS
95109 }
0 commit comments