Skip to content

Commit

Permalink
CI: Replace the setup-gradle action with setup-android
Browse files Browse the repository at this point in the history
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
  • Loading branch information
aperezdc committed Nov 21, 2024
1 parent 02e2f1b commit 085a7a8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
7 changes: 5 additions & 2 deletions .github/workflows/publish-to-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 085a7a8

Please sign in to comment.