Skip to content

Commit 5d93bf5

Browse files
authored
Merge pull request #1 from dg0yt/qtbase-android
Separate script to acquire SDK, limit CI
2 parents c8e91b6 + 9785d29 commit 5d93bf5

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
$JDKVersion = '17.0.2'
2+
$ToolsVersion = '10406996_latest'
3+
4+
Write-Host "Downloading the JDK"
5+
& "./vcpkg" x-download openjdk-$JDKVersion.tar.gz "--sha512=0bf168239a9a1738ad6368b8f931d072aeb122863ec39ea86dc0449837f06953ce18be87bab7e20fd2585299a680ea844ec419fa235da87dfdd7e37b73740a57" "--url=https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-${JDKVersion}_linux-x64_bin.tar.gz" @cachingArgs
6+
7+
Write-Host "Setting up the JDK in $env:JAVA_HOME"
8+
$env:JAVA_HOME = Join-Path $Pwd "jdk-$JDKVersion"
9+
& tar -xvf openjdk-$JDKVersion.tar.gz
10+
11+
Write-Host "Downloading the Android SDK"
12+
& "./vcpkg" x-download sdk-commandlinetools-linux-$ToolsVersion.zip "--sha512=64b7d18ee7adeb1204eaa2978091e874dc9af9604796b64e1a185a11c15325657383fc9900e55e4590c8b8a2784b3881745d2f32daef1207e746c0ee41c2b72b" "--url=https://dl.google.com/android/repository/commandlinetools-linux-${ToolsVersion}.zip"
13+
14+
$env:ANDROID_HOME = Join-Path $Pwd "android-sdk"
15+
Write-Host "Setting up the Android SDK in $env:ANDROID_HOME"
16+
& unzip -q sdk-commandlinetools-linux-$ToolsVersion.zip -d android-sdk
17+
# https://doc.qt.io/qt-6/android-getting-started.html
18+
& bash -c 'yes | ./android-sdk/cmdline-tools/bin/sdkmanager "--sdk_root=$ANDROID_HOME" "platform-tools" "platforms;android-34" "build-tools;34.0.0"'
19+
& ./android-sdk/cmdline-tools/bin/sdkmanager "--sdk_root=$env:ANDROID_HOME" --list_installed

scripts/azure-pipelines/azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ parameters:
1212
- name: tripletPattern
1313
displayName: 'Enable triplets which contain this substring'
1414
type: string
15-
default: '-'
15+
default: 'android'
1616

1717
jobs:
1818
- template: windows/azure-pipelines.yml

scripts/azure-pipelines/test-modified-ports.ps1

+1-17
Original file line numberDiff line numberDiff line change
@@ -122,23 +122,7 @@ if ($IsWindows) {
122122

123123
if ($IsLinux)
124124
{
125-
Write-Host "Downloading and setting up Java"
126-
& "./vcpkg" x-download openjdk.tar.gz "--sha512=0bf168239a9a1738ad6368b8f931d072aeb122863ec39ea86dc0449837f06953ce18be87bab7e20fd2585299a680ea844ec419fa235da87dfdd7e37b73740a57" "--url=https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz" @cachingArgs
127-
& tar -xvzf openjdk.tar.gz
128-
$env:JAVA_HOME = Join-Path $Pwd "jdk-17.0.2"
129-
Write-Host "Downloading Android SDK"
130-
& "./vcpkg" x-download android-sdk.zip "--sha512=64b7d18ee7adeb1204eaa2978091e874dc9af9604796b64e1a185a11c15325657383fc9900e55e4590c8b8a2784b3881745d2f32daef1207e746c0ee41c2b72b" "--url=https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip"
131-
132-
133-
Write-Host "Setting up SDK"
134-
& unzip -q android-sdk.zip -d android-sdk
135-
$env:ANDROID_SDK_ROOT = Join-Path $Pwd "android-sdk"
136-
Move-Item -Path ./android-sdk/cmdline-tools/ -Destination ./android-sdk/tools
137-
New-Item -Path ./android-sdk -Name cmdline-tools -ItemType directory
138-
Move-Item -Path ./android-sdk/tools -Destination ./android-sdk/cmdline-tools
139-
& bash -c 'yes | ./android-sdk/cmdline-tools/tools/bin/sdkmanager --licenses'
140-
141-
& ./android-sdk/cmdline-tools/tools/bin/sdkmanager "platforms;android-33"
125+
. ./scripts/azure-pipelines/acquire-android-sdk.ps1
142126
$NoParentHashes = $true
143127
}
144128

0 commit comments

Comments
 (0)