Skip to content

Commit 517d761

Browse files
committed
fix: update Android SDK setup in CI workflow; use android-actions/setup-android and streamline license acceptance
1 parent e4909f6 commit 517d761

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,13 @@ jobs:
8787
distribution: 'zulu'
8888
java-version: '17'
8989

90-
- name: Finalize Android SDK
90+
- name: Setup Android SDK
9191
if: env.turbo_cache_hit != 1
92-
run: |
93-
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
92+
uses: android-actions/setup-android@v3
93+
94+
- name: Accept Android SDK licenses
95+
if: env.turbo_cache_hit != 1
96+
run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses || true
9497

9598
- name: Cache Gradle
9699
if: env.turbo_cache_hit != 1
@@ -103,10 +106,8 @@ jobs:
103106
restore-keys: |
104107
${{ runner.os }}-gradle-
105108
106-
- name: Set ANDROID_HOME env var
107-
run: echo "ANDROID_HOME=/usr/local/share/android/sdk" >> $GITHUB_ENV
108-
109109
- name: Create local.properties for Android SDK
110+
if: env.turbo_cache_hit != 1
110111
run: echo "sdk.dir=$ANDROID_HOME" > example/android/local.properties
111112

112113
- name: Build example for Android

0 commit comments

Comments
 (0)