Consider this statement from Phase 05 of 80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md.
- Update
scenario-builds.yml to include Java scenarios (if applicable).
Analysis
The scenario-builds.yml workflow verifies that example scenarios under scenarios compile for each SDK language. Java is completely absent — there are zero Java implementations in any scenario directory, and the workflow has no Java job or path triggers.
Current state of scenarios
Each scenario (e.g., gh-app) contains subdirectories per language (typescript/, python, go, csharp/, sometimes rust). Java has none.
What's needed
Two things:
-
Create Java implementations inside select scenario directories (e.g., test/scenarios/auth/gh-app/java/, test/scenarios/tools/custom-agents/java/, etc.) — each with a pom.xml referencing the local SDK and a Main.java demonstrating the feature.
-
Add a build-java job to scenario-builds.yml — sets up JDK 17, finds all test/scenarios/*/java/pom.xml files, and builds each one.
Proposed Plan
Phase A: Determine scope — Decide which scenarios get Java implementations. Candidates (matching what other core SDKs cover):
auth/gh-app
tools/custom-agents
callbacks/
sessions/
prompts/
modes/
Phase B: Create Java scenario implementations — For each selected scenario:
- Create
test/scenarios/<name>/java/pom.xml with a dependency on the local Java SDK (../../../java/)
- Create
test/scenarios/<name>/java/src/main/java/Main.java mirroring the logic from the TypeScript or C# version
Phase C: Update scenario-builds.yml — Add:
java/** to the paths trigger
- A
build-java job (JDK 17, Maven cache, iterate over scenario POMs and build each)
Phase D: Verify — Run the workflow locally or in CI to confirm all Java scenarios compile.
Consider this statement from Phase 05 of
80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md.scenario-builds.ymlto include Java scenarios (if applicable).Analysis
The
scenario-builds.ymlworkflow verifies that example scenarios under scenarios compile for each SDK language. Java is completely absent — there are zero Java implementations in any scenario directory, and the workflow has no Java job or path triggers.Current state of scenarios
Each scenario (e.g., gh-app) contains subdirectories per language (
typescript/, python, go,csharp/, sometimes rust). Java has none.What's needed
Two things:
Create Java implementations inside select scenario directories (e.g.,
test/scenarios/auth/gh-app/java/,test/scenarios/tools/custom-agents/java/, etc.) — each with apom.xmlreferencing the local SDK and aMain.javademonstrating the feature.Add a
build-javajob toscenario-builds.yml— sets up JDK 17, finds alltest/scenarios/*/java/pom.xmlfiles, and builds each one.Proposed Plan
Phase A: Determine scope — Decide which scenarios get Java implementations. Candidates (matching what other core SDKs cover):
auth/gh-apptools/custom-agentscallbacks/sessions/prompts/modes/Phase B: Create Java scenario implementations — For each selected scenario:
test/scenarios/<name>/java/pom.xmlwith a dependency on the local Java SDK (../../../java/)test/scenarios/<name>/java/src/main/java/Main.javamirroring the logic from the TypeScript or C# versionPhase C: Update
scenario-builds.yml— Add:java/**to thepathstriggerbuild-javajob (JDK 17, Maven cache, iterate over scenario POMs and build each)Phase D: Verify — Run the workflow locally or in CI to confirm all Java scenarios compile.