Refresh bench tooling and Claude profiles#1
Conversation
|
@codex review |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR refreshes the Java bench tooling to a newer JDK and Gradle stack, updates Sonar/SonarCloud and devcontainer/Docker layer configuration, and wires in portable Claude account profiles to keep this bench aligned with the shared workBenches parent. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The README now lists Gradle 9.6.1 in
GRADLE_HOMEbut still showsGradle Version: 8.5in the container details section; align these version references to avoid confusion. - After changing
JAVA_HOMEto the OpenJDK 25 path, ensure any remaining scripts, Dockerfiles, or devcontainer settings that reference the old 21 path are updated consistently to prevent mismatched runtime configurations.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The README now lists Gradle 9.6.1 in `GRADLE_HOME` but still shows `Gradle Version: 8.5` in the container details section; align these version references to avoid confusion.
- After changing `JAVA_HOME` to the OpenJDK 25 path, ensure any remaining scripts, Dockerfiles, or devcontainer settings that reference the old 21 path are updated consistently to prevent mismatched runtime configurations.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull request overview
Refreshes the Java bench environment to newer runtime/tooling versions and updates devcontainer mounts to support portable Claude profiles, keeping the bench aligned with the parent workbenches stack.
Changes:
- Upgrade the bench runtime/toolchain (OpenJDK 25, Gradle 9.6.1) and refresh several bundled CLIs/tools in
Dockerfile.layer2. - Bump Sonar/JaCoCo-related helper script defaults and README examples to newer plugin versions.
- Add a devcontainer bind mount for
~/.claude-profilesand update setup messaging/docs for the new JDK.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.sh | Updates startup messaging to reflect OpenJDK 25. |
| README.md | Updates documented JDK and Sonar plugin versions; (needs additional doc sync for Gradle/Spring CLI versions). |
| files/sonarcloud-java-maven | Bumps default JaCoCo + Sonar Maven plugin versions used by the helper script. |
| files/sonarcloud-java-gradle | Bumps default Sonar Gradle plugin version used by the helper script. |
| Dockerfile.layer2 | Upgrades JDK/Gradle and refreshes install approach (aria2, SDKMAN archive installs, tool version bumps). |
| .devcontainer/devcontainer.json | Adds bind mount for portable Claude profiles. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **OpenJDK 25** (LTS version) | ||
| - **Maven** - Dependency management and build tool | ||
| - **Gradle 8.5** - Modern build automation |
| - Base Image: dev-bench-base | ||
| - JDK Version: OpenJDK 21 | ||
| - JDK Version: OpenJDK 25 | ||
| - Maven Version: (from apt) | ||
| - Gradle Version: 8.5 | ||
| - Spring Boot CLI: 3.2.0 |
| RUN curl -fsSL $CURL_RETRY_OPTS "https://get.sdkman.io" | bash \ | ||
| && bash -c "source $HOME/.sdkman/bin/sdkman-init.sh" \ | ||
| && mv /root/.sdkman /opt/sdkman \ | ||
| && chmod -R a+rx /opt/sdkman |
| "https://api.sdkman.io/2/broker/download/${candidate}/${version}/linuxx64"; \ | ||
| unzip -q "$archive" -d "$extract_dir"; \ | ||
| first_entry="$(find "$extract_dir" -mindepth 1 -maxdepth 1 | head -n1)"; \ | ||
| entry_count="$(find "$extract_dir" -mindepth 1 -maxdepth 1 | wc -l)"; \ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2783febca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| # Set JAVA_HOME | ||
| ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 | ||
| ENV JAVA_HOME=/usr/lib/jvm/java-25-openjdk-amd64 |
There was a problem hiding this comment.
Update devcontainer env to match installed tool paths
This switches the image to install only JDK 25, but the normal devcontainer/compose entrypoints still export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 and GRADLE_HOME=/opt/gradle/gradle-8.5 (.devcontainer/devcontainer.json and .devcontainer/docker-compose.yml). In the VS Code or setup.sh flow those environment values override the Dockerfile defaults, so Maven/Gradle and the Java extension will start with nonexistent tool paths even though the new binaries are on the image. Please update those devcontainer/compose settings with this version bump.
Useful? React with 👍 / 👎.
| // AI Agent Credentials | ||
| "source=${localEnv:HOME}/.claude,target=/home/${localEnv:USER}/.claude,type=bind,consistency=cached", | ||
| "source=${localEnv:HOME}/.claude.json,target=/home/${localEnv:USER}/.claude.json,type=bind,consistency=cached", | ||
| "source=${localEnv:HOME}/.claude-profiles,target=/home/${localEnv:USER}/.claude-profiles,type=bind,consistency=cached", |
There was a problem hiding this comment.
Create the optional Claude profiles path before mounting
This adds a type=bind mount for $HOME/.claude-profiles, but the initializeCommand only pre-creates .agents, .pi, and .config/sonarqube. On hosts that have the existing Claude config but have not created portable profiles yet, Dev Containers/Docker --mount fails before the container starts because the bind source does not exist. Please either create this path during initialization or make the mount conditional/optional.
Useful? React with 👍 / 👎.
| ARG SONAR_GRADLE_PLUGIN_VERSION=7.3.1.8318 | ||
| ARG SPRINGBOOT_VERSION=4.1.0 | ||
| ARG KOTLIN_VERSION=2.4.0 | ||
| ARG GROOVY_VERSION=6.0.0-alpha-1 |
There was a problem hiding this comment.
Pin Groovy to a stable SDKMAN release
This makes the global groovy command install 6.0.0-alpha-1; upstream marks the Groovy 6 alpha line as not recommended for production use, so any Groovy/Grails/Spock scripts run from this bench can hit pre-release language or runtime changes. Since the image otherwise refreshes stable toolchain components, please pin this to the current stable Groovy line instead of an alpha release.
Useful? React with 👍 / 👎.
Summary
Validation
git diff --checkbash -ndocker buildx build --checkSummary by Sourcery
Update the Java development bench to newer tooling versions and align supporting configuration and cloud analysis scripts with the refreshed stack.
New Features:
Enhancements:
Documentation: