Skip to content

Android Gradle Plugin version finder

Actions
Find current stable and latest Android Gradle Plugin version for later use in Github Actions matrix
v1.0.1
Latest
Star (1)

Android Gradle Plugin version finder - GitHub Action

.github/workflows/pull_request.yml

Find current stable and latest Android Gradle Plugin version for GitHub Actions matrix builds.

Usage

The action only exposes multiple outputs containing latest version for each AGP release channel.

Configuration:

Simple usage:

  jobs:
    actual-tests:
      runs-on: ubuntu-latest
      strategy:
        fail-fast: false
        matrix:
          javaVersion: [ 21 ]
          gradle: [ current, release-candidate ]
          agp: [ "stable", "rc", "alpha" ]
      steps:
        - id: agp-version-finder
          uses: usefulness/agp-version-finder-action@v1
          with:
            version-to-resolve: ${{ matrix.agp }}

        - run: echo ${{ steps.agp-version-finder.outputs.resolved-version }}

Extra: Use AGP version in job name:

  jobs:
    provide-agp-version-matrix:
      runs-on: ubuntu-latest
      outputs:
        agp-versions: ${{ steps.build-agp-matrix.outputs.agp-versions }}
      steps:
        # Fetch latest AGP versions
        - id: agp-version-finder
          uses: usefulness/agp-version-finder-action@v1

        # Consume action outputs to build AGP matrix
        - id: build-agp-matrix
          run: echo 'agp-versions=["${{ steps.agp-version-finder.outputs.latest-stable }}", "${{ steps.agp-version-finder.outputs.latest-alpha }}"]' >> $GITHUB_OUTPUT

      actual-tests:
        runs-on: ubuntu-latest
        needs:
          - provide-agp-version-matrix
        strategy:
          fail-fast: false
          matrix:
            javaVersion: [ 21 ]
            gradle: [ current, release-candidate ]
            # When evaluated will be replaced with array ["7.2.2", "7.4.0-alpha13"] 
            agp: ${{ fromJSON(needs.provide-agp-version-matrix.outputs.agp-versions) }}

source

All available action outputs, representing respective AGP release channels:

  • latest-stable i.e. "7.2.2"
  • latest-rc i.e. "7.3.0-rc01"
  • latest-beta i.e. "7.3.0-beta02"
  • latest-alpha i.e. "7.4.0-alpha13"

Android Gradle Plugin version finder is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Find current stable and latest Android Gradle Plugin version for later use in Github Actions matrix
v1.0.1
Latest

Android Gradle Plugin version finder is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.