Setup Android SDK #89
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
name: Build on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-24.04-arm, windows-2025, macos-15 ] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Setup Android SDK | |
if: matrix.os == 'ubuntu-24.04-arm' | |
shell: bash | |
run: | | |
mkdir -p ~/android/cmdline-tools | |
echo 'ANDROID_HOME=~/android' >> "$GITHUB_ENV" | |
curl -OL https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip | |
unzip commandlinetools-linux-11076708_latest.zip -d ~/android/cmdline-tools | |
rm commandlinetools-linux-11076708_latest.zip | |
mv ~/android/cmdline-tools/cmdline-tools ~/android/cmdline-tools/latest | |
yes | ~/android/cmdline-tools/latest/bin/sdkmanager --licenses || true | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
build-scan-publish: true | |
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" | |
build-scan-terms-of-use-agree: "yes" | |
- name: Build with Gradle | |
shell: bash | |
run: | | |
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties | |
echo 'org.gradle.caching=true' >> gradle.properties | |
echo 'org.gradle.parallel=true' >> gradle.properties | |
./gradlew assemble | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-artifact | |
path: app/build/outputs |