Skip to content

Commit a7921bb

Browse files
committed
build.ps1: rename WindowsSDKs and AndroidSDKs
Rename these parameters to `WindowsSDKArchitectures` and `AndroidSDKArchitectures`. This frees up `WindowsSDKs` and `AndroidSDKs` to allow multiple SDKs per-OS.
1 parent 2ecf873 commit a7921bb

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

utils/build.ps1

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ The API Level to target when building the Android SDKs
3838
.PARAMETER Android
3939
When set, build android SDKs.
4040
41-
.PARAMETER AndroidSDKs
41+
.PARAMETER AndroidSDKArchitectures
4242
An array of architectures for which the Android Swift SDK should be built.
4343
44-
.PARAMETER WindowsSDKs
44+
.PARAMETER WindowsSDKArchitectures
4545
An array of architectures for which the Windows Swift SDK should be built.
4646
4747
.PARAMETER ProductVersion
@@ -120,8 +120,8 @@ param
120120
[string] $SwiftDebugFormat = "dwarf",
121121
[ValidateRange(1, 36)]
122122
[int] $AndroidAPILevel = 28,
123-
[string[]] $AndroidSDKs = @(),
124-
[string[]] $WindowsSDKs = @("X64","X86","Arm64"),
123+
[string[]] $AndroidSDKArchitectures = @(),
124+
[string[]] $WindowsSDKArchitectures = @("X64","X86","Arm64"),
125125
[string] $ProductVersion = "0.0.0",
126126
[string] $ToolchainIdentifier = $(if ($env:TOOLCHAIN_VERSION) { $env:TOOLCHAIN_VERSION } else { "$env:USERNAME.development" }),
127127
[string] $PinnedBuild = "",
@@ -182,17 +182,17 @@ if (($PinnedBuild -or $PinnedSHA256 -or $PinnedVersion) -and -not ($PinnedBuild
182182
throw "If any of PinnedBuild, PinnedSHA256, or PinnedVersion is set, all three must be set."
183183
}
184184

185-
if ($Android -and ($AndroidSDKs.Length -eq 0)) {
185+
if ($Android -and ($AndroidSDKArchitectures.Length -eq 0)) {
186186
# Enable all android SDKs by default.
187-
$AndroidSDKs = @("aarch64","armv7","i686","x86_64")
187+
$AndroidSDKArchitectures = @("aarch64","armv7","i686","x86_64")
188188
}
189189

190190
# Work around limitations of cmd passing in array arguments via powershell.exe -File
191-
if ($AndroidSDKs.Length -eq 1) { $AndroidSDKs = $AndroidSDKs[0].Split(",") }
192-
if ($WindowsSDKs.Length -eq 1) { $WindowsSDKs = $WindowsSDKs[0].Split(",") }
191+
if ($AndroidSDKArchitectures.Length -eq 1) { $AndroidSDKArchitectures = $AndroidSDKArchitectures[0].Split(",") }
192+
if ($WindowsSDKArchitectures.Length -eq 1) { $WindowsSDKArchitectures = $WindowsSDKArchitectures[0].Split(",") }
193193
if ($Test.Length -eq 1) { $Test = $Test[0].Split(",") }
194194

195-
if ($AndroidSDKs.Length -gt 0) {
195+
if ($AndroidSDKArchitectures.Length -gt 0) {
196196
# Always enable android when one of the SDKs is specified.
197197
$Android = $true
198198
}
@@ -492,7 +492,7 @@ if ($Android -and ($HostPlatform -ne $KnownPlatforms["WindowsX64"])) {
492492
}
493493

494494
# Resolve the architectures received as argument
495-
$AndroidSDKBuilds = @($AndroidSDKs | ForEach-Object {
495+
$AndroidSDKBuilds = @($AndroidSDKArchitectures | ForEach-Object {
496496
switch ($_) {
497497
"aarch64" { $KnownPlatforms["AndroidARM64"] }
498498
"armv7" { $KnownPlatforms["AndroidARMv7"] }
@@ -502,7 +502,7 @@ $AndroidSDKBuilds = @($AndroidSDKs | ForEach-Object {
502502
}
503503
})
504504

505-
$WindowsSDKBuilds = @($WindowsSDKs | ForEach-Object {
505+
$WindowsSDKBuilds = @($WindowsSDKArchitectures | ForEach-Object {
506506
switch ($_) {
507507
"X64" { $KnownPlatforms["WindowsX64"] }
508508
"X86" { $KnownPlatforms["WindowsX86"] }

0 commit comments

Comments
 (0)