summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Sarajärvi <tony.sarajarvi@qt.io>2019-01-22 15:24:28 +0200
committerLiang Qi <liang.qi@qt.io>2019-01-23 01:29:37 +0000
commit47d14b365ed7ee6b174d48c9cb14d72c66c26d71 (patch)
treed2fa0c118fe4746130ce03cac606dca9dda435a3
parent56b801a77e8c16aa3df9737c6d41aa1ca22b82ed (diff)
Accept license in Android SDK provisioning
A change in Android SDK prompts us now for accepting license. Task-number: QTQAINFRA-2591 Change-Id: I1ff05d84ccda743649c6d38784c6170e08f50eb1 Reviewed-by: Liang Qi <liang.qi@qt.io>
-rw-r--r--coin/provisioning/common/windows/android.ps17
1 files changed, 4 insertions, 3 deletions
diff --git a/coin/provisioning/common/windows/android.ps1 b/coin/provisioning/common/windows/android.ps1
index 90c33fbd..1b4dd35d 100644
--- a/coin/provisioning/common/windows/android.ps1
+++ b/coin/provisioning/common/windows/android.ps1
@@ -85,7 +85,7 @@ if (IsProxyEnabled) {
# Remove "http://" from the beginning
$proxy = $proxy.Remove(0,7)
$proxyhost,$proxyport = $proxy.split(':')
- $sdkmanager_args = "--no_https --proxy=http --proxy_host=`"$proxyhost`" --proxy_port=`"$proxyport`" "
+ $sdkmanager_args = "--no_https", "--proxy=http", "--proxy_host=`"$proxyhost`"", "--proxy_port=`"$proxyport`""
}
New-Item -ItemType Directory -Force -Path C:\Utils\Android\licenses
@@ -95,9 +95,10 @@ Out-File -FilePath C:\Utils\Android\licenses\android-sdk-license -Encoding utf8
# Get a PATH where Java's path is defined from previous provisioning
[Environment]::SetEnvironmentVariable("PATH", [Environment]::GetEnvironmentVariable("PATH", "Machine"), "Process")
-$sdkmanager_args += " platforms;$sdkApiLevel platform-tools build-tools;$sdkBuildToolsVersion"
-Run-Executable "$toolsFolder\bin\sdkmanager.bat" "$sdkmanager_args"
cd $toolsFolder\bin\
+$sdkmanager_args += "platforms;$sdkApiLevel", "platform-tools", "build-tools;$sdkBuildToolsVersion"
+$command = 'for($i=0;$i -lt 6;$i++) { $response += "y`n"}; $response | .\sdkmanager.bat @sdkmanager_args'
+iex $command
$command = 'for($i=0;$i -lt 6;$i++) { $response += "y`n"}; $response | .\sdkmanager.bat --licenses'
iex $command
cmd /c "dir C:\Utils\android"