Remove `gradle-wrapper.jar` from source tree
The ASF Release Policy mentions that a source release should not contain compiled code. Jar files, like the gradle/wrapper/gradle-wrapper.jar file, are compiled code and should not be included in source releases. The Gradle build tool currently offers no way out-of-the box to run Gradle without having the wrapper jar in the source tree.
The repository demonstrates how to use Gradle without having the wrapper jar in the source tree.
This change adopts these changes for Apache Beam, and also
- Replace the deprecated
gradle/gradle-build-action(repo is archived/read-only) withgradle/actions/setup-gradle - Remove usage of the no longer necessary
gradle/wrapper-validation-action(repo is archived/read-only)
Summary of Changes
Hello @snazy, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request modernizes the project's Gradle setup by removing the gradle-wrapper.jar from the source tree, aligning with ASF release guidelines. It introduces dynamic downloading and verification of the Gradle wrapper and updates GitHub Actions to use supported versions, enhancing build integrity and maintainability across the project's modules.
Highlights
- ASF Release Policy Compliance: The
gradle-wrapper.jarfile has been removed from the source tree to comply with Apache Software Foundation (ASF) Release Policy, which prohibits compiled code in source releases. - Dynamic Gradle Wrapper Download: New
gradlew-include.shandgradlew-include.ps1scripts have been introduced across various modules to dynamically download and verify thegradle-wrapper.jarand its checksum at runtime, ensuring integrity and policy compliance. - GitHub Actions Update: Deprecated GitHub Actions (
gradle/gradle-build-actionandgradle/wrapper-validation-action) have been replaced with the currentgradle/actions/setup-gradleaction, improving maintenance and security for the build environment. - Git Ignore Configuration: The
.gitignorefile has been updated to explicitly ignoregradle-wrapper.jarand its associated checksum files, preventing accidental re-inclusion into the repository.
Ignored Files
- Ignored by pattern:
.github/workflows/**(1)- .github/workflows/code_completion_plugin_tests.yml
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.
As discussed with @snazy, I will review it.
Assigning reviewers:
R: @chamikaramj for label java. R: @liferoad for label build.
Note: If you would like to opt out of this review, comment assign to next reviewer.
Available commands:
stop reviewer notifications- opt out of the automated review toolingremind me after tests pass- tag the comment author after tests passwaiting on author- shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
The PR bot will only process comments in the main thread (not review comments).
Reminder, please take a look at this pr: @chamikaramj @liferoad
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:
R: @ahmedabu98 for label java. R: @Abacn for label build.
Available commands:
stop reviewer notifications- opt out of the automated review toolingremind me after tests pass- tag the comment author after tests passwaiting on author- shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
Reminder, please take a look at this pr: @ahmedabu98 @Abacn
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:
R: @kennknowles for label java. R: @damccorm for label build.
Available commands:
stop reviewer notifications- opt out of the automated review toolingremind me after tests pass- tag the comment author after tests passwaiting on author- shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
stop reviewer notifications
Stopping reviewer notifications for this pull request: requested by reviewer. If you'd like to restart, comment assign set of reviewers
This seems like a mostly-benign change. It is also fine to simply exclude the jar from the source release zip (I'm actually surprised if this is not already the case).
The github action upgrades are nice and I don't think they require discussion - could they be decoupled and committed first?
@kennknowles sure! I've just rebased this branch and split it into 2 commits, the 1st commit is the content of #37064.