Remove the gradle-wrapper.jar#1461
Conversation
3fa41c0 to
1cb1d69
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1461 +/- ##
=======================================
Coverage 43.90% 43.90%
=======================================
Files 313 313
Lines 34213 34213
=======================================
Hits 15022 15022
Misses 18213 18213
Partials 978 978
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@grcevski thoughts? |
There was a problem hiding this comment.
Pull request overview
This PR removes the Gradle wrapper artifacts from the embedded Java agent project and updates build/CI/Docker/documentation to use the host/container gradle CLI instead, reducing tracked binary wrapper files in the repo.
Changes:
- Removed Gradle wrapper scripts/config (including the tracked wrapper JAR) from
pkg/internal/java. - Updated CI, Make targets, and Docker build steps to invoke
gradledirectly. - Updated Java agent docs/benchmark docs to reflect the new build prerequisites/commands, and refreshed the embedded agent JAR.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/internal/java/gradlew.bat |
Removed Windows Gradle wrapper script. |
pkg/internal/java/gradlew |
Removed POSIX Gradle wrapper script. |
pkg/internal/java/gradle/wrapper/gradle-wrapper.properties |
Removed wrapper configuration (no longer pinning Gradle via wrapper). |
pkg/internal/java/gradle/wrapper/gradle-wrapper.jar |
Removed tracked wrapper binary. |
pkg/internal/java/agent/src/jmh/java/io/opentelemetry/obi/java/instrumentations/util/BENCHMARK_README.md |
Updated benchmark commands to use gradle (needs minor doc clarification). |
pkg/internal/java/README.md |
Updated prerequisites and build commands for wrapper-less workflows. |
.github/workflows/java-agent.yml |
Switched CI steps from ./gradlew to gradle. |
Makefile |
Switched Java targets from wrapper to gradle and added JAVA_HOME selection based on .java-version. |
Dockerfile |
Switched Java agent build step from wrapper to gradle. |
javaagent.Dockerfile |
Switched Java agent build step from wrapper to gradle. |
internal/test/integration/components/obi/Dockerfile-with-javaagent |
Switched integration image Java agent build step from wrapper to gradle. |
pkg/internal/java/embedded/obi-java-agent.jar |
Refreshed embedded agent artifact (binary update). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Looks like Java 8 testing wasn't actually testing against Java 8. Pushed a fix here. |
grcevski
left a comment
There was a problem hiding this comment.
LGTM! Yeah we should remove them, the build will make them anyway.
Stop tracking the binary Gradle wrapper JAR in git history. Update the Gradle wrapper JAR/workflow from the Java integration and standardizes builds on the host/container
gradleCLI.Changes
pkg/internal/java(gradle-wrapper.jar,gradlew,gradlew.bat, wrapper properties).gradledirectly in:.github/workflows/java-agent.ymlMakefileDockerfilejavaagent.Dockerfileinternal/test/integration/components/obi/Dockerfile-with-javaagentpkg/internal/java/README.mdpkg/internal/java/agent/src/jmh/.../BENCHMARK_README.mdpkg/internal/java/embedded/obi-java-agent.jar.Fixes
Added fix for Java 8 CI correctness by enforcing Java 8 API targeting at compile time (
options.release = 8in the Java Gradle config). This prevents newer-JDK method signatures from leaking into compiled classes (e.g.,ByteBuffer.flip()/position()return types), which causedNoSuchMethodErrorwhen tests were executed on JDK 8. The Java 8 matrix path now runs successfully with Gradle on the pinned JDK and tests on the matrix JDK.Validation
make java-notices-updateproduced no diffs).