Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions agent_sdks/kotlin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Gradle template
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

### Kotlin template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

88 changes: 88 additions & 0 deletions agent_sdks/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins {
kotlin("jvm") version "2.1.10"
kotlin("plugin.serialization") version "2.1.10"
id("java-library")
id("com.ncorti.ktfmt.gradle") version "0.19.0"
id("org.jetbrains.kotlinx.kover") version "0.9.1"
}

ktfmt {
googleStyle()
}

version = "0.1.0"
group = "com.google.a2ui"

kotlin {
jvmToolchain(21)
}

repositories {
mavenCentral()
}

dependencies {
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
implementation("com.networknt:json-schema-validator:1.5.1")
implementation("com.fasterxml.jackson.core:jackson-databind:2.17.2")

// Core Dependencies
api("com.google.adk:google-adk:0.9.0")
api("com.google.adk:google-adk-a2a:0.9.0")
api("io.github.a2asdk:a2a-java-sdk-client:1.0.0.Alpha3")
api("com.google.genai:google-genai:1.43.0")

testImplementation(kotlin("test"))
testImplementation("io.mockk:mockk:1.13.11")
}

tasks.test {
useJUnitPlatform()
}

val copySpecs by tasks.registering(Copy::class) {
val repoRoot = projectDir.parentFile.parentFile

from(File(repoRoot, "specification/v0_8/json/server_to_client.json")) {
into("com/google/a2ui/assets/0.8")
}
from(File(repoRoot, "specification/v0_8/json/standard_catalog_definition.json")) {
into("com/google/a2ui/assets/0.8")
}

from(File(repoRoot, "specification/v0_9/json/server_to_client.json")) {
into("com/google/a2ui/assets/0.9")
}
from(File(repoRoot, "specification/v0_9/json/common_types.json")) {
into("com/google/a2ui/assets/0.9")
}
from(File(repoRoot, "specification/v0_9/json/basic_catalog.json")) {
into("com/google/a2ui/assets/0.9")
}

into(layout.buildDirectory.dir("generated/resources/specs"))
}

sourceSets {
main {
resources {
srcDir(copySpecs)
}
}
}
7 changes: 7 additions & 0 deletions agent_sdks/kotlin/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading