From 8d6a568253c8208e7e42290f81951fcf1de2fa72 Mon Sep 17 00:00:00 2001 From: johan12345 Date: Sun, 12 May 2024 16:58:34 +0200 Subject: [PATCH] update SDK --- .github/workflows/screenshots.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/screenshots.yml b/.github/workflows/screenshots.yml index b9c4d15a4..63fa951ed 100644 --- a/.github/workflows/screenshots.yml +++ b/.github/workflows/screenshots.yml @@ -17,10 +17,12 @@ jobs: api-level: 34 display_size: 1080x2336 # subtracted the 64px bottom navigation bar type: phone - - profile: Pixel Tablet + - profile: pixel_tablet api-level: 34 display_size: 2560x1488 # subtracted the 64px navigation bar and 48px status bar type: tenInch + env: + ANDROID_USER_HOME: /home/runner/.android steps: - name: Enable KVM group perms run: | @@ -38,6 +40,23 @@ jobs: mkdir ~/.config/.android echo $DEBUG_KEYSTORE_BASE64 | base64 --decode > ~/.config/.android/debug.keystore + - name: Set up Java environment + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'zulu' + cache: 'gradle' + + - name: Setup Android SDK + run: | + $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "cmdline-tools;latest" + rm -r $ANDROID_HOME/cmdline-tools/latest + mv $ANDROID_HOME/cmdline-tools/latest-2 $ANDROID_HOME/cmdline-tools/latest + $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --version + $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install emulator 'system-images;android-34;google_atd;x86_64' + $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd --force -n test --abi 'google_atd/x86_64' --package 'system-images;android-34;google_atd;x86_64' --device 'pixel_tablet' + $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager list avd + - name: AVD cache uses: actions/cache@v3 id: avd-cache @@ -62,13 +81,6 @@ jobs: disable-animations: true script: echo "Generated AVD snapshot for caching." - - name: Set up Java environment - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: 'zulu' - cache: 'gradle' - - name: Build app run: ./gradlew assembleGoogleNormalDebug assembleGoogleNormalAndroidTest env: