Skip to content
play

GitHub Action

Run gradle task

2.1.3 Latest version

Run gradle task

play

Run gradle task

Run Android Gradle tasks

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run gradle task

uses: jojo243/[email protected]

Learn more about this action in jojo243/android-gradle-action

Choose a version

android-gradle-action

Run Android Gradle tasks with GitHub Actions.

Note

This action may not be required to run Android builds.

Instead, you can simply try to execute the gradle wrapper in the GitHub action VM with :

- name: Run tests
  run: ./gradlew test

Example

name: Android Gradle CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Run Gradle command
      uses: jojo243/[email protected]
      with:
        # The gradle command you wish to run (required)
        # Here, `./gradlew test` will be run
        script: test

        # In some cases, you may need to provide
        # Android license agreement id
        # You can find it on your own machine under
        # `$ANDROID_HOME/licenses/android-sdk-license`,
        # and add the file content as a GitHub secret named `$ANDROID_LICENSE`.
        android-license: ${{ secrets.ANDROID_LICENSE }}