install android 26

This commit is contained in:
Kyle Spearrin 2017-11-20 16:17:28 -05:00
parent 84e79e92b4
commit 7435ede254
3 changed files with 41 additions and 1 deletions

View file

@ -1,6 +1,7 @@
skip_tags: true
init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- ps: install-android26.ps1
on_finish:
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
before_build:

View file

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
VisualStudioVersion = 15.0.27004.2009
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Android", "src\Android\Android.csproj", "{04B18ED2-B76D-4947-8474-191F8FD2B5E0}"
EndProject
@ -33,6 +33,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UWP", "src\UWP\UWP.csproj",
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "UWP.Images", "src\UWP.Images\UWP.Images.shproj", "{0BE54BBB-7772-4289-BD51-1FDBB0CC2446}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F0E2E596-C3DB-474A-9C88-7824662894FA}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
appveyor.yml = appveyor.yml
crowdin.yml = crowdin.yml
README.md = README.md
SECURITY.md = SECURITY.md
EndProjectSection
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\UWP.Images\UWP.Images.projitems*{0be54bbb-7772-4289-bd51-1fdbb0cc2446}*SharedItemsImports = 13

30
install-android26.ps1 Normal file
View file

@ -0,0 +1,30 @@
$AndroidToolPath = "${env:ProgramFiles(x86)}\Android\android-sdk\tools\android"
Function Get-AndroidSDKs() {
$output = & $AndroidToolPath list sdk --all
$sdks = $output |% {
if ($_ -match '(?<index>\d+)- (?<sdk>.+), revision (?<revision>[\d\.]+)') {
$sdk = New-Object PSObject
Add-Member -InputObject $sdk -MemberType NoteProperty -Name Index -Value $Matches.index
Add-Member -InputObject $sdk -MemberType NoteProperty -Name Name -Value $Matches.sdk
Add-Member -InputObject $sdk -MemberType NoteProperty -Name Revision -Value $Matches.revision
$sdk
}
}
$sdks
}
Function Install-AndroidSDK() {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true, Position=0)]
[PSObject[]]$sdks
)
$sdkIndexes = $sdks |% { $_.Index }
$sdkIndexArgument = [string]::Join(',', $sdkIndexes)
Echo 'y' | & $AndroidToolPath update sdk -u -a -t $sdkIndexArgument
}
# install android 26
$sdks = Get-AndroidSDKs |? { $_.name -like 'sdk platform*API 26*' }
Install-AndroidSDK -sdks $sdks