DEV Community

Cover image for Keep your Gradle Wrapper up-to-date! 🤖
Cristian Greco
Cristian Greco

Posted on

1 3

Keep your Gradle Wrapper up-to-date! 🤖

My Workflow

Are you using Gradle Wrapper in your project? How often do you update it?

Maintaining dependencies up-to-date is regarded as a good practice, and the build system files should be no exception!

The Update Gradle Wrapper Action aims to help keeping Gradle projects on GitHub polished to high standards and to strengthen the software supply chain in the Gradle ecosystem.

As soon as a new Gradle release is available, this action will open a PR to update your Wrapper files.

Check it out now: gradle-update/update-gradle-wrapper-action

Pull Request

How to use it

Just create a new workflow file .github/workflows/update-gradle-wrapper.yml and paste this:

name: Update Gradle Wrapper

on:
  schedule:
    - cron: "0 0 * * *"

jobs:
  update-gradle-wrapper:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Update Gradle Wrapper
      uses: gradle-update/update-gradle-wrapper-action@v1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
Enter fullscreen mode Exit fullscreen mode

Submission Category:

Maintainer Must-Haves

Link to Code

GitHub logo gradle-update / update-gradle-wrapper-action

Keep Gradle Wrapper up-to-date with this action.

Update Gradle Wrapper Action

CI

This action keeps the Gradle Wrapper script in your projects up-to-date to the latest release.

Schedule an automatic daily or weekly workflow: as soon as a new Gradle release is available, the action will open a PR ready to be merged. It's like Dependabot for Gradle Wrapper. 🤖

Pull Request

Table of Contents

Usage

Create a new dedicated workflow file:

.github/workflows/update-gradle-wrapper.yml

Paste this configuration:

name: Update Gradle Wrapper
on
  schedule
    - cron: "0 0 * * *"

jobs:
  update-gradle-wrapper:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Update Gradle Wrapper
        uses: gradle-update/update-gradle-wrapper-action@v1
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
Enter fullscreen mode Exit fullscreen mode

The action will run every day around…

Additional Resources / Info

Check the detailed description of action inputs and some more usage examples.

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay