diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index d1984b2ac..915f857fd 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -29,7 +29,7 @@ function Get-BazeliskVersion { } function Get-CodeQLBundleVersion { - $CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "codeql" | Join-Path -ChildPath "*" + $CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*" $CodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Select-Object -First 1 -Expand FullName $CodeQLPath = Join-Path $CodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql" $CodeQLVersion = & $CodeQLPath version --quiet diff --git a/images/macos/macos-10.15-Readme.md b/images/macos/macos-10.15-Readme.md index 26492d8e6..af4024fc6 100644 --- a/images/macos/macos-10.15-Readme.md +++ b/images/macos/macos-10.15-Readme.md @@ -1,15 +1,15 @@ # macOS 10.15 info - System Version: macOS 10.15.6 (19G2021) - Kernel Version: Darwin 19.6.0 -- Image Version: 20200916.1 +- Image Version: 20200918.1 ## Installed Software ### Language and Runtime - Clang/LLVM 10.0.1 -- gcc-8 (Homebrew GCC 8.4.0_1) 8.4.0 — available by `gcc-8` alias -- gcc-9 (Homebrew GCC 9.3.0) 9.3.0 — available by `gcc-9` alias -- GNU Fortran (Homebrew GCC 8.4.0_1) 8.4.0 — available by `gfortran-8` alias -- GNU Fortran (Homebrew GCC 9.3.0) 9.3.0 — available by `gfortran-9` alias +- gcc-8 (Homebrew GCC 8.4.0_1) 8.4.0 - available by `gcc-8` alias +- gcc-9 (Homebrew GCC 9.3.0) 9.3.0 - available by `gcc-9` alias +- GNU Fortran (Homebrew GCC 8.4.0_1) 8.4.0 - available by `gfortran-8` alias +- GNU Fortran (Homebrew GCC 9.3.0) 9.3.0 - available by `gfortran-9` alias - Node.js v12.18.3 - NVM 0.35.3 - NVM - Cached node versions: v6.17.1 v8.17.0 v10.22.1 v12.18.4 v13.14.0 v14.11.0 @@ -24,15 +24,15 @@ ### Package Management - Vcpkg 2020.06.15 +- Pip 19.3.1 (python 2.7) +- Pip 20.1.1 (python 3.8) - Bundler version 2.1.4 -- Carthage 0.35.0 +- Carthage 0.36.0 - CocoaPods 1.9.3 - Homebrew 2.5.1 - NPM 6.14.6 - Yarn 1.22.5 - NuGet 5.6.0.6489 -- Pip 19.3.1 (python 2.7) -- Pip 20.1.1 (python 3.8) - Miniconda 4.8.3 - RubyGems 3.1.4 - Composer 1.10.13 @@ -46,12 +46,11 @@ - Curl 7.72.0 - Git: 2.28.0 - Git LFS: 2.12.0 -- GitHub CLI: 0.12.0 +- GitHub CLI: 1.0.0 - Hub CLI: 2.14.2 - GNU Wget 1.20.3 - Subversion (SVN) 1.14.0 - Packer 1.6.2 -- GNU parallel 20200722 - OpenSSL 1.0.2t 10 Sep 2019 `(/usr/local/opt/openssl -> /usr/local/Cellar/openssl@1.0.2t/1.0.2t)` - jq 1.6 - gpg (GnuPG) 2.2.23 @@ -62,24 +61,25 @@ - zstd 1.4.5 - bazel 3.5.0 - bazelisk 1.6.1 -- helm v3.3.1+g249e521 +- helm v3.3.2+ge507725 - virtualbox 6.1.14r140239 - mongo v4.4.0 - mongod v4.4.0 - Vagrant 2.2.10 - 7-Zip 16.02 - Newman 5.2.0 +- GNU parallel 20200722 ### Tools -- Fastlane 2.159.0 +- Fastlane 2.160.0 - Cmake 3.18.2 - App Center CLI 2.7.0 - Azure CLI 2.11.1 - AWS CLI 2.0.48 - AWS SAM CLI 1.2.0 - AWS Session Manager CLI 1.1.61.0 -- Aliyun CLI 3.0.56 +- Aliyun CLI 3.0.58 - GHCup v0.1.10 - GHC 8.10.2 - Cabal 3.2.0.0 @@ -90,8 +90,8 @@ - SwiftLint 0.40.2 ### Browsers -- Safari 13.1.2 (15609.3.5.1.3) -- SafariDriver 13.1.2 (15609.3.5.1.3) +- Safari 14.0 (15610.1.28.1.9) +- SafariDriver 14.0 (15610.1.28.1.9) - Google Chrome 85.0.4183.102 - ChromeDriver 85.0.4183.87 - Microsoft Edge 85.0.564.51 @@ -161,7 +161,7 @@ ### Xamarin #### Visual Studio for Mac -- 8.7.5.19 +- 8.7.7.10 #### Mono - 6.12.0.93 @@ -205,6 +205,7 @@ ### Xcode | Version | Build | Path | | -------------- | -------- | ------------------------------- | +| 12.2 | 12B5018i | /Applications/Xcode_12.2.app | | 12.0 | 12A8189n | /Applications/Xcode_12_beta.app | | 12.0 | 12A7209 | /Applications/Xcode_12.app | | 11.7 (default) | 11E801a | /Applications/Xcode_11.7.app | @@ -219,18 +220,18 @@ | 10.3 | 10G8 | /Applications/Xcode_10.3.app | #### Xcode Support Tools +- xcpretty 0.3.0 +- xcversion 2.6.6 - Nomad CLI 3.1.4 - Nomad CLI IPA ipa 0.14.3 -- xcpretty 0.3.0 - xctool 0.3.7 -- xcversion 2.6.6 #### Installed SDKs | SDK | SDK Name | Xcode Version | | ----------------------- | -------------------- | ---------------------------------------------------------------- | | macOS 10.14 | macosx10.14 | 10.3 | | macOS 10.15 | macosx10.15 | 11.0, 11.1, 11.2.1, 11.3.1, 11.4, 11.4.1, 11.5, 11.6, 11.7, 12.0 | -| macOS 11.0 | macosx11.0 | 12.0 | +| macOS 11.0 | macosx11.0 | 12.0, 12.2 | | iOS 12.4 | iphoneos12.4 | 10.3 | | iOS 13.0 | iphoneos13.0 | 11.0 | | iOS 13.1 | iphoneos13.1 | 11.1 | @@ -240,6 +241,7 @@ | iOS 13.6 | iphoneos13.6 | 11.6 | | iOS 13.7 | iphoneos13.7 | 11.7 | | iOS 14.0 | iphoneos14.0 | 12.0, 12.0 | +| iOS 14.2 | iphoneos14.2 | 12.2 | | Simulator - iOS 12.4 | iphonesimulator12.4 | 10.3 | | Simulator - iOS 13.0 | iphonesimulator13.0 | 11.0 | | Simulator - iOS 13.1 | iphonesimulator13.1 | 11.1 | @@ -249,28 +251,33 @@ | Simulator - iOS 13.6 | iphonesimulator13.6 | 11.6 | | Simulator - iOS 13.7 | iphonesimulator13.7 | 11.7 | | Simulator - iOS 14.0 | iphonesimulator14.0 | 12.0, 12.0 | +| Simulator - iOS 14.2 | iphonesimulator14.2 | 12.2 | | tvOS 12.4 | appletvos12.4 | 10.3 | | tvOS 13.0 | appletvos13.0 | 11.0, 11.1 | | tvOS 13.2 | appletvos13.2 | 11.2.1, 11.3.1 | | tvOS 13.4 | appletvos13.4 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | | tvOS 14.0 | appletvos14.0 | 12.0, 12.0 | +| tvOS 14.2 | appletvos14.2 | 12.2 | | Simulator - tvOS 12.4 | appletvsimulator12.4 | 10.3 | | Simulator - tvOS 13.0 | appletvsimulator13.0 | 11.0, 11.1 | | Simulator - tvOS 13.2 | appletvsimulator13.2 | 11.2.1, 11.3.1 | | Simulator - tvOS 13.4 | appletvsimulator13.4 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | | Simulator - tvOS 14.0 | appletvsimulator14.0 | 12.0, 12.0 | +| Simulator - tvOS 14.2 | appletvsimulator14.2 | 12.2 | | watchOS 5.3 | watchos5.3 | 10.3 | | watchOS 6.0 | watchos6.0 | 11.0, 11.1 | | watchOS 6.1 | watchos6.1 | 11.2.1, 11.3.1 | | watchOS 6.2 | watchos6.2 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | | watchOS 7.0 | watchos7.0 | 12.0, 12.0 | +| watchOS 7.1 | watchos7.1 | 12.2 | | Simulator - watchOS 5.3 | watchsimulator5.3 | 10.3 | | Simulator - watchOS 6.0 | watchsimulator6.0 | 11.0, 11.1 | | Simulator - watchOS 6.1 | watchsimulator6.1 | 11.2.1, 11.3.1 | | Simulator - watchOS 6.2 | watchsimulator6.2 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | | Simulator - watchOS 7.0 | watchsimulator7.0 | 12.0, 12.0 | +| Simulator - watchOS 7.1 | watchsimulator7.1 | 12.2 | | DriverKit 19.0 | driverkit.macosx19.0 | 11.0, 11.1, 11.2.1, 11.3.1, 11.4, 11.4.1, 11.5, 11.6, 11.7, 12.0 | -| DriverKit 20.0 | driverkit.macosx20.0 | 12.0 | +| DriverKit 20.0 | driverkit.macosx20.0 | 12.0, 12.2 | #### Installed Simulators | OS | Xcode Version | Simulators | @@ -284,18 +291,18 @@ | iOS 13.5 | 11.5 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPhone SE (2nd generation)
iPad (7th generation)
iPad Air (3rd generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Pro (9.7-inch) | | iOS 13.6 | 11.6 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPhone SE (2nd generation)
iPad (7th generation)
iPad Air (3rd generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Pro (9.7-inch) | | iOS 13.7 | 11.7 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPhone SE (2nd generation)
iPad (7th generation)
iPad Air (3rd generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Pro (9.7-inch) | -| iOS 14.0 | 12.0 | iPod touch (7th generation)
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPhone SE (2nd generation)
iPad (7th generation)
iPad Air (3rd generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Pro (9.7-inch) | +| iOS 14.0 | 12.0
12.0 | iPod touch (7th generation)
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPhone SE (2nd generation)
iPad (7th generation)
iPad (8th generation)
iPad Air (3rd generation)
iPad Air (4th generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Pro (9.7-inch) | | tvOS 12.4 | 10.3 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | | tvOS 13.0 | 11.0
11.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | | tvOS 13.2 | 11.2.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | | tvOS 13.3 | 11.3.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | | tvOS 13.4 | 11.4
11.4.1
11.5
11.6
11.7 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| tvOS 14.0 | 12.0 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| tvOS 14.0 | 12.0
12.0 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | | watchOS 5.3 | 10.3 | Apple Watch Series 2 - 38mm
Apple Watch Series 2 - 42mm
Apple Watch Series 3 - 38mm
Apple Watch Series 3 - 42mm
Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm | | watchOS 6.0 | 11.0
11.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | | watchOS 6.1 | 11.2.1
11.3.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | | watchOS 6.2 | 11.4
11.4.1
11.5
11.6
11.7 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | -| watchOS 7.0 | 12.0 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | +| watchOS 7.0 | 12.0
12.0 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm
Apple Watch Series 6 - 40mm
Apple Watch Series 6 - 44mm | ### Android #### Android SDK Tools diff --git a/images/macos/provision/core/audiodevice.sh b/images/macos/provision/core/audiodevice.sh index 705490de2..4a151e3f9 100644 --- a/images/macos/provision/core/audiodevice.sh +++ b/images/macos/provision/core/audiodevice.sh @@ -12,8 +12,3 @@ brew install sox echo "set Soundflower (2ch) as input/output device" SwitchAudioSource -s "Soundflower (2ch)" -t input SwitchAudioSource -s "Soundflower (2ch)" -t output - -echo "grant microphone permission for simulators" -sudo sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "insert into access values('kTCCServiceMicrophone','com.apple.CoreSimulator.SimulatorTrampoline', 0,1,1,NULL,NULL,NULL,'UNUSED',NULL,NULL,1576347152)" -sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "insert into access values('kTCCServiceMicrophone','/usr/local/opt/runner/runprovisioner.sh', 1,1,1,NULL,NULL,NULL,'UNUSED',NULL,NULL,1576661342)" -sudo sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "insert into access values('kTCCServiceMicrophone','/usr/local/opt/runner/runprovisioner.sh', 1,1,1,NULL,NULL,NULL,'UNUSED',NULL,NULL,1576661342)" diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 index 87c944598..0ef53471e 100644 --- a/images/macos/software-report/SoftwareReport.Generator.ps1 +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -289,6 +289,8 @@ $markdown += New-MDList -Lines (Build-XamarinAndroidList) -Style Unordered $markdown += New-MDHeader "Unit Test Framework" -Level 4 $markdown += New-MDList -Lines @(Get-NUnitVersion) -Style Unordered +# First run doesn't provide full data about devices and runtimes +Get-XcodeInfoList | Out-Null # Xcode section $xcodeInfo = Get-XcodeInfoList $markdown += New-MDHeader "Xcode" -Level 3 @@ -301,12 +303,9 @@ $markdown += New-MDHeader "Installed SDKs" -Level 4 $markdown += Build-XcodeSDKTable $xcodeInfo | New-MDTable $markdown += New-MDNewLine -# Disable simulators table on 11.0 beta for now since "simctl" tool doesn't work properly -if (-not $os.IsBigSur) { - $markdown += New-MDHeader "Installed Simulators" -Level 4 - $markdown += Build-XcodeSimulatorsTable $xcodeInfo | New-MDTable - $markdown += New-MDNewLine -} +$markdown += New-MDHeader "Installed Simulators" -Level 4 +$markdown += Build-XcodeSimulatorsTable $xcodeInfo | New-MDTable +$markdown += New-MDNewLine # Android section $markdown += New-MDHeader "Android" -Level 3 diff --git a/images/macos/toolsets/toolset-10.15.json b/images/macos/toolsets/toolset-10.15.json index 8497a7100..f834385c2 100644 --- a/images/macos/toolsets/toolset-10.15.json +++ b/images/macos/toolsets/toolset-10.15.json @@ -19,35 +19,35 @@ "android-versions": [ "11.0.2.0", "10.3.1.4", "10.2.0.100", "10.1.3.7", "10.0.6.2" ], - "bundle-default": "latest", + "bundle-default": "6_12_0", "bundles": [ { "symlink": "6_12_1", "mono":"6.12", "ios": "14.0", "mac": "6.20", - "android": "11.0" + "android": "11.0" }, { "symlink": "6_12_0", "mono":"6.12", "ios": "13.20", "mac": "6.20", - "android": "11.0" + "android": "11.0" }, { "symlink": "6_10_0", "mono":"6.10", "ios": "13.18", "mac": "6.18", - "android": "10.3" + "android": "10.3" }, { "symlink": "6_8_1", "mono":"6.8", "ios": "13.16", "mac": "6.16", - "android": "10.2" + "android": "10.2" }, { "symlink": "6_8_0", diff --git a/images/macos/toolsets/toolset-11.0.json b/images/macos/toolsets/toolset-11.0.json index 725da2188..f4e9a57c8 100644 --- a/images/macos/toolsets/toolset-11.0.json +++ b/images/macos/toolsets/toolset-11.0.json @@ -19,21 +19,21 @@ "android-versions": [ "11.0.2.0" ], - "bundle-default": "latest", + "bundle-default": "6_12_0", "bundles": [ { "symlink": "6_12_1", "mono":"6.12", "ios": "14.0", "mac": "6.20", - "android": "11.0" + "android": "11.0" }, { "symlink": "6_12_0", "mono":"6.12", "ios": "13.20", "mac": "6.20", - "android": "11.0" + "android": "11.0" } ] }, diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 77d57aef1..34c1abcb3 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -160,12 +160,6 @@ "type": "windows-restart", "restart_timeout": "30m" }, - { - "type": "powershell", - "scripts": [ - "{{ template_dir }}/scripts/Installers/Update-DockerImages.ps1" - ] - }, { "type": "powershell", "valid_exit_codes": [ @@ -176,6 +170,7 @@ "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" ], "scripts": [ + "{{ template_dir }}/scripts/Installers/Update-DockerImages.ps1", "{{ template_dir }}/scripts/Installers/Install-VS.ps1", "{{ template_dir }}/scripts/Installers/Install-NET48.ps1", "{{ template_dir }}/scripts/Installers/Windows2016/Install-SSDT.ps1" diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 473051dba..10b6e5dc1 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -184,6 +184,7 @@ "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" ], "scripts": [ + "{{ template_dir }}/scripts/Installers/Update-DockerImages.ps1", "{{ template_dir }}/scripts/Installers/Install-VS.ps1", "{{ template_dir }}/scripts/Installers/Install-NET48.ps1" ], diff --git a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 index e150e1a12..1f52d22e6 100644 --- a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 +++ b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 @@ -37,6 +37,9 @@ Export-ModuleMember -Function @( 'Get-VsCatalogJsonPath' 'Get-VisualStudioPath' 'Install-AndroidSDKPackages' + 'Get-AndroidPackages' + 'Get-AndroidPackagesByName' + 'Get-AndroidPackagesByVersion' 'Get-VisualStudioPackages' 'Get-VisualStudioComponents' ) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 282c03762..aed13b999 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -418,3 +418,41 @@ function Install-AndroidSDKPackages { & $AndroidSDKManagerPath --sdk_root=$AndroidSDKRootPath "$PrefixPackageName$package" } } + +function Get-AndroidPackages { + Param + ( + [Parameter(Mandatory=$true)] + [string]$AndroidSDKManagerPath + ) + + return (& $AndroidSDKManagerPath --list --verbose).Trim() | Foreach-Object { $_.Split()[0] } | Where-Object {$_} +} + +function Get-AndroidPackagesByName { + Param ( + [Parameter(Mandatory=$true)] + [string[]]$AndroidPackages, + [Parameter(Mandatory=$true)] + [string]$PrefixPackageName + ) + + return $AndroidPackages | Where-Object { "$_".StartsWith($PrefixPackageName) } +} + +function Get-AndroidPackagesByVersion { + Param ( + [Parameter(Mandatory=$true)] + [string[]]$AndroidPackages, + [Parameter(Mandatory=$true)] + [string]$PrefixPackageName, + [object]$MinimumVersion, + [char]$Delimiter, + [int]$Index = 0 + ) + + $Type = $MinimumVersion.GetType() + $packagesByName = Get-AndroidPackagesByName -AndroidPackages $AndroidPackages -PrefixPackageName $PrefixPackageName + $packagesByVersion = $packagesByName | Where-Object { ($_.Split($Delimiter)[$Index] -as $Type) -ge $MinimumVersion } + return $packagesByVersion | Sort-Object { $_.Split($Delimiter)[$Index] -as $Type} -Unique +} diff --git a/images/win/scripts/Installers/Update-AndroidSDK.ps1 b/images/win/scripts/Installers/Update-AndroidSDK.ps1 index b5b9a67f7..c27a4c18c 100644 --- a/images/win/scripts/Installers/Update-AndroidSDK.ps1 +++ b/images/win/scripts/Installers/Update-AndroidSDK.ps1 @@ -3,14 +3,7 @@ ## Desc: Install and update Android SDK and tools ################################################################################ -# Download the latest command line tools so that we can accept all of the licenses. -# See https://developer.android.com/studio/#command-tools -$sdkArchPath = Start-DownloadWithRetry -Url "https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip" -Name "android-sdk-tools.zip" - -# Don't replace the one that VS installs as it seems to break things. -Expand-Archive -Path $sdkArchPath -DestinationPath android-sdk -Force - -$sdk = Get-Item -Path .\android-sdk +$ErrorActionPreference = "Stop" # Install the standard Android SDK licenses. In the past, there wasn't a better way to do this, # so we are base64-encoding a zip of the licenses directory from another installation. @@ -30,7 +23,6 @@ $content = [System.Convert]::FromBase64String($base64Content) Set-Content -Path .\android-sdk-licenses.zip -Value $content -Encoding Byte Expand-Archive -Path .\android-sdk-licenses.zip -DestinationPath 'C:\Program Files (x86)\Android\android-sdk' -Force - # run the updates. # keep newer versions in descending order @@ -42,15 +34,32 @@ $sdkManager = "$sdkRoot\tools\bin\sdkmanager.bat" & $sdkManager --sdk_root=$sdkRoot "platform-tools" -Install-AndroidSDKPackages -AndroidSDKManagerPath $sdkManager ` - -AndroidSDKRootPath $sdkRoot ` - -AndroidPackages $androidToolset.platform_list ` - -PrefixPackageName "platforms;" +# get packages info +$androidPackages = Get-AndroidPackages -AndroidSDKManagerPath $sdkManager + +# platforms +[int]$platformMinVersion = $androidToolset.platform_min_version +$platformList = Get-AndroidPackagesByVersion -AndroidPackages $androidPackages ` + -PrefixPackageName "platforms;" ` + -MinimumVersion $platformMinVersion ` + -Delimiter "-" ` + -Index 1 + +# build-tools +[version]$buildToolsMinVersion = $androidToolset.build_tools_min_version +$buildToolsList = Get-AndroidPackagesByVersion -AndroidPackages $androidPackages ` + -PrefixPackageName "build-tools;" ` + -MinimumVersion $buildToolsMinVersion ` + -Delimiter ";" ` + -Index 1 Install-AndroidSDKPackages -AndroidSDKManagerPath $sdkManager ` -AndroidSDKRootPath $sdkRoot ` - -AndroidPackages $androidToolset.build_tools ` - -PrefixPackageName "build-tools;" + -AndroidPackages $platformList + +Install-AndroidSDKPackages -AndroidSDKManagerPath $sdkManager ` + -AndroidSDKRootPath $sdkRoot ` + -AndroidPackages $buildToolsList Install-AndroidSDKPackages -AndroidSDKManagerPath $sdkManager ` -AndroidSDKRootPath $sdkRoot ` diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Android.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Android.psm1 index f85423c2c..d3c9a1743 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Android.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Android.psm1 @@ -31,7 +31,6 @@ function Get-AndroidInstalledPackages { return $androidInstalledPackages } - function Build-AndroidTable { $packageInfo = Get-AndroidInstalledPackages return @( diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 2f45ecde1..377331ada 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -230,4 +230,8 @@ $markdown += New-MDHeader "Android" -Level 3 $markdown += Build-AndroidTable | New-MDTable $markdown += New-MDNewLine +# Docker images section +$markdown += New-MDHeader "Cached Docker images" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @(Get-CachedDockerImages) + $markdown | Out-File -FilePath "C:\InstalledSoftware.md" \ No newline at end of file diff --git a/images/win/scripts/Tests/Android.Tests.ps1 b/images/win/scripts/Tests/Android.Tests.ps1 index 8a1b6c0bb..d6c81db4a 100644 --- a/images/win/scripts/Tests/Android.Tests.ps1 +++ b/images/win/scripts/Tests/Android.Tests.ps1 @@ -2,16 +2,27 @@ Import-Module (Join-Path $PSScriptRoot "..\SoftwareReport\SoftwareReport.Android Describe "Android SDK" { $androidToolset = (Get-ToolsetContent).android + $androidPackages = Get-AndroidPackages -AndroidSDKManagerPath (Get-AndroidSDKManagerPath) $androidInstalledPackages = Get-AndroidInstalledPackages $platformTestCases = @() - $platformList = $androidToolset.platform_list + [int]$platformMinVersion = $androidToolset.platform_min_version + $platformList = Get-AndroidPackagesByVersion -AndroidPackages $androidPackages ` + -PrefixPackageName "platforms;" ` + -MinimumVersion $platformMinVersion ` + -Delimiter "-" ` + -Index 1 $platformList | ForEach-Object { $platformTestCases += @{ platformVersion = $_; installedPackages = $androidInstalledPackages } } $buildToolsTestCases = @() - $buildToolsList = $androidToolset.build_tools + [version]$buildToolsMinVersion = $androidToolset.build_tools_min_version + $buildToolsList = Get-AndroidPackagesByVersion -AndroidPackages $androidPackages ` + -PrefixPackageName "build-tools;" ` + -MinimumVersion $buildToolsMinVersion ` + -Delimiter ";" ` + -Index 1 $buildToolsList | ForEach-Object { $buildToolsTestCases += @{ buildToolsVersion = $_; installedPackages = $androidInstalledPackages } } @@ -35,14 +46,14 @@ Describe "Android SDK" { } It "Platform version is installed" -TestCases $platformTestCases { - "$installedPackages" | Should -Match "platforms;$platformVersion" + "$installedPackages" | Should -Match "$platformVersion" } It "Platform build tools is installed" -TestCases $buildToolsTestCases { - "$installedPackages" | Should -Match "build-tools;$buildToolsVersion" + "$installedPackages" | Should -Match "$buildToolsVersion" } - if (Test-isWin19) { + if (Test-IsWin19) { It "Extra package is installed" -TestCases $extraPackagesTestCases { "$installedPackages" | Should -Match "extras;$extraPackage" } diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index c3702c599..5e0b23c6b 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -127,12 +127,8 @@ } ], "android": { - "platform_list": [ - "android-30", "android-29", "android-28", "android-27", "android-26", "android-25", "android-24", "android-23", "android-22", "android-21", "android-19" - ], - "build_tools": [ - "30.0.2", "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.1", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0", "23.0.3", "23.0.2", "23.0.1", "22.0.1", "21.1.2", "20.0.0", "19.1.0" - ], + "platform_min_version": "19", + "build_tools_min_version": "19.1.0", "extra_list": [ "android;m2repository", "google;m2repository", diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index f431836f6..bf1d0dff6 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -136,12 +136,8 @@ } ], "android": { - "platform_list": [ - "android-30", "android-29", "android-28", "android-27", "android-26", "android-25", "android-24", "android-23", "android-22", "android-21", "android-19" - ], - "build_tools": [ - "30.0.2", "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.1", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0", "23.0.3", "23.0.2", "23.0.1", "22.0.1", "21.1.2", "20.0.0", "19.1.0" - ], + "platform_min_version": "19", + "build_tools_min_version": "19.1.0", "extra_list": [ "android;m2repository", "google;m2repository",