Skip to content

build(deps): Migrate Google ADK and ADK-A2A from v0.9.0 to v1.5.0#1754

Open
theyihlin wants to merge 4 commits into
a2ui-project:mainfrom
theyihlin:migrate-adk-1.5
Open

build(deps): Migrate Google ADK and ADK-A2A from v0.9.0 to v1.5.0#1754
theyihlin wants to merge 4 commits into
a2ui-project:mainfrom
theyihlin:migrate-adk-1.5

Conversation

@theyihlin

Copy link
Copy Markdown
Contributor

Summary

This PR upgrades the google-adk and google-adk-a2a dependencies to the latest stable version 1.5.0, keeping the A2UI Kotlin SDK aligned with the latest ADK specification and capabilities. Per the integration plan, the a2a-java-sdk-client dependency remains untouched at 1.0.0.Alpha3.


Key Changes

1. Dependency Upgrades

  • Bumps com.google.adk:google-adk and com.google.adk:google-adk-a2a to 1.5.0 in:
    • agent_sdks/kotlin/build.gradle.kts
    • samples/community/agent/adk/rizzcharts/java/build.gradle.kts
    • samples/community/agent/adk/rizzcharts/kotlin/build.gradle.kts

2. Session Lifecycle Refactoring (SessionKey Integration)

  • Refactored A2aHandler to construct the SessionKey at the very beginning of the RPC handling block.
  • Passed this SessionKey directly to a refined getOrCreateSession(sessionKey) method and to runner.runAsync(...). This unifies the lifecycle around SessionKey and removes parameter duplication.
  • Adapted getOrCreateSession to utilize the new ADK v1.5.0 two-parameter signature: getSession(SessionKey, GetSessionConfig?) passing null for the config, which replaces the legacy Java Optional wrapper.

3. Test Suite Adjustments

  • A2aConformanceTest.kt: Updated the mock runner expectations to match the new SessionKey and two-parameter getSession signatures.
  • AdkExtensionsConformanceTest.kt: Added mock stubbing for Part.partMetadata() on the mocked GenAI Part object to prevent MockKException caused by internal calls inside the new ADK v1.5.0 event converter.

Verification

  • Formatted all modified Kotlin source and test files using ktfmt.
  • Successfully compiled and ran the full Kotlin SDK test suite, with all 216 tests passing:
    $ ./gradlew test
    ...
    BUILD SUCCESSFUL in 7s

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the Google ADK dependency from version 0.9.0 to 1.5.0 across multiple build files and refactors session management in A2aHandler to use SessionKey instead of individual string parameters. Feedback suggests using Kotlin's Elvis operator (?:) in getOrCreateSession to simplify the control flow and avoid mutable variables.

Comment thread agent_sdks/kotlin/src/main/kotlin/com/google/a2ui/a2a/A2aHandler.kt Outdated
@theyihlin theyihlin changed the title Migrate Google ADK and ADK-A2A to v1.5.0 build(deps): Migrate Google ADK and ADK-A2A from v0.9.0 to v1.5.0 Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant