Skip to content

Bring Java into parity for scenario-builds.yml #1423

@edburns

Description

@edburns

Consider this statement from Phase 05 of 80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md.

  1. 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:

  1. 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.

  2. 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:

  1. Create test/scenarios/<name>/java/pom.xml with a dependency on the local Java SDK (../../../java/)
  2. 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:

  1. java/** to the paths trigger
  2. 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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions