Skip to content

Automatically perform wrapper validation check in setup-gradle #12

Closed

Description

@bigdaz

Currently, we recommend that users configure a separate workflow running the wrapper-validation-action to verify that the Gradle wrapper jar is not corrupted.

Doing this automatically for any workflow using setup-gradle and dependency-submission would increase coverage of wrapper validation and reduce the complexity for users adopting Gradle with GitHub actions. The functionality already exists with the validate-wrappers parameter: this issue is about enabling this by default.

Issues outstanding to allow this:

Activity

  1. added
    enhancement
    on Jan 28, 2022
  2. eygraber commented on Nov 25, 2022

    @eygraber

    Is there any timeline on this happening?

  3. erichaagdev commented on Mar 13, 2023

    @erichaagdev
    Member

    Currently, we recommend that users configure a separate workflow running the wrapper-validation-action to verify that the Gradle wrapper jar is not corrupted.

    I would recommend adding the Gradle wrapper validation check immediately after checkout in any workflow that may run a Gradle wrapper. This eliminates the risk of potentially running a bad wrapper at all in any workflow. For example:

    name: Build
    on: [ push, pull_request ]
    
    jobs:
      build:
        name: Build
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v3
          - uses: gradle/wrapper-validation-action@v1
          - uses: gradle/gradle-build-action@v2
          - run: ./gradlew clean build
  4. JLLeitschuh commented on Apr 4, 2023

    @JLLeitschuh
    Contributor

    I think the biggest thing blocking this from happening is that currently Gradle doesn't publish wrapper SHAs for SNAPSHOT releases. As such, projects like gradle/gradle can't use the verification action because it is regularly using pre-release builds to build Gradle.

  5. JLLeitschuh commented on Feb 3, 2024

    @JLLeitschuh
    Contributor

    @bigdaz this looks like it may be possible now that Gradle publishes snapshot checksums, right?

  6. changed the title [-]Automatically perform wrapper validation check[/-] [+]Automatically perform wrapper validation check in `setup-gradle`[/+] on Feb 9, 2024
  7. leonard84 commented on Mar 22, 2024

    @leonard84
    Member

    I think the biggest thing blocking this from happening is that currently Gradle doesn't publish wrapper SHAs for SNAPSHOT releases. As such, projects like gradle/gradle can't use the verification action because it is regularly using pre-release builds to build Gradle.

    If they are still not published, this could easily be mitigated by introducing a switch to disable wrapper validation for SNAPSHOT versions or completely. However, having validation enabled by default would make everyone safer.

  8. assigned and unassigned on Apr 11, 2024
  9. self-assigned this
    on Jul 19, 2024
  10. removed their assignment
    on Jul 19, 2024
  11. added this to the v4.0.0 milestone on Jul 22, 2024
  12. added 4 commits that reference this issue on Aug 1, 2024
    007acad
    c19c071
    3f6c170
    b644be6
  13. added a commit that references this issue on May 30, 2025
  14. added a commit that references this issue on May 30, 2025
    269273b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementin:wrapper-validation

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions