Skip to content

Commit

Permalink
Update yml
Browse files Browse the repository at this point in the history
  • Loading branch information
muzahidul-opti committed Aug 9, 2024
1 parent 9678437 commit bd8cb89
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 17

- name: Install Android SDK
run: |
sudo apt-get update
sudo apt-get install -y wget unzip
wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip -O commandlinetools.zip
unzip commandlinetools.zip -d $HOME/android-sdk
mkdir -p $HOME/android-sdk/cmdline-tools/latest
mv $HOME/android-sdk/cmdline-tools/* $HOME/android-sdk/cmdline-tools/latest/
export ANDROID_HOME=$HOME/android-sdk
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH
yes | sdkmanager --licenses
sdkmanager --install 'build-tools;34.0.0' platform-tools 'platforms;android-29'
sdkmanager --install emulator --channel=0
sdkmanager --install 'system-images;android-29;default;arm64-v8a' --channel=0
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Gradle cache
Expand All @@ -108,13 +124,6 @@ jobs:
~/.android/adb*
~/.android/debug.keystore
key: avd-${{ matrix.api-level }}

- name: Install latest build tools, platform tools, and platform
run: |
yes | sdkmanager --licenses > /dev/null
sdkmanager --install 'build-tools;34.0.0' platform-tools 'platforms;android-29' > /dev/null
sdkmanager --install emulator --channel=0 > /dev/null
sdkmanager --install 'system-images;android-29;default;arm64-v8a' --channel=0 > /dev/null

- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
Expand Down

0 comments on commit bd8cb89

Please sign in to comment.