From 085a7a8f0b9e82d014d3cef46c69323f7a3c6921 Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Thu, 21 Nov 2024 14:14:08 +0200 Subject: [PATCH] CI: Replace the setup-gradle action with setup-android The setup-android action takes care of making sure that the Android SDK is installed in the desired version, and let the gradlew wrappers fetch Gradle as-needed (which is the recommended anyway). This makes workflows work with Act [1], allowing running and debugging them locally. [1] https://github.com/nektos/act --- .github/workflows/build.yml | 7 +++++-- .github/workflows/check.yml | 7 +++++-- .github/workflows/lint.yml | 7 +++++-- .github/workflows/publish-to-maven-central.yml | 7 +++++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 546fb0b79..9e2253bce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,11 @@ jobs: with: distribution: temurin java-version: 17 - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + with: + cmdline-tools-version: 11076708 + log-accepted-android-sdk-licenses: false - name: Build Project run: ./gradlew assemble${{ inputs.build_type }} - name: Save MiniBrowser Artifacts diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9b541fc5e..e6fd217b2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -12,8 +12,11 @@ jobs: with: distribution: temurin java-version: 17 - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + with: + cmdline-tools-version: 11076708 + log-accepted-android-sdk-licenses: false - name: Check Code Format run: ./gradlew checkFormat diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fb8dd0680..c93b316b1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,10 @@ jobs: with: distribution: temurin java-version: 17 - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + with: + cmdline-tools-version: 11076708 + log-accepted-android-sdk-licenses: false - name: Lint checks run: ./gradlew lint${{ inputs.build_type }} diff --git a/.github/workflows/publish-to-maven-central.yml b/.github/workflows/publish-to-maven-central.yml index 896b2224c..1119285c9 100644 --- a/.github/workflows/publish-to-maven-central.yml +++ b/.github/workflows/publish-to-maven-central.yml @@ -17,8 +17,11 @@ jobs: with: distribution: temurin java-version: 17 - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + with: + cmdline-tools-version: 11076708 + log-accepted-android-sdk-licenses: false - name: Build and publish run: ./gradlew wpeview:publishMavenPublicationToMavenCentralRepository env: