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.

Agent.ai Challenge image

Congrats to the Agent.ai Challenge Winners 🏆

The wait is over! We are excited to announce the winners of the Agent.ai Challenge.

From meal planners to fundraising automators to comprehensive stock analysts, our team of judges hung out with a lot of agents and had a lot to deliberate over. There were so many creative and innovative submissions, it is always so difficult to select our winners.

Read more →

Top comments (0)

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay