CloudAgentLoader hardcoded to Maven target/classes prevents Gradle support in Dev UI
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 267
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 9
Description
When using the ADK Web Dev UI in a Gradle project, the CloudAgentLoader fails to locate agent classes. The loader is currently hardcoded to look in the Maven-standard target/classes directory.
**Location of Issue:** In CloudAgentLoader.java:
Java
Path targetClasses = sourceDir.resolve("target/classes");
**Observed Behavior**: In a Gradle project, compiled classes are located in build/classes/java/main. Because the path is hardcoded to target/classes, the Dev UI reports "No agents found" or fails to load agents entirely when running in a Gradle environment.
Expected Behavior: The CloudAgentLoader should detect if the project is using Gradle or Maven (e.g., checking for build.gradle vs pom.xml).
Steps to Reproduce:
Create a standard Java project using Gradle.
Define a BaseAgent as per ADK documentation.
Start the AdkDevServer.
The server fails to discover the agent because it looks for a target/ folder that does not exist.
Contributor guide
Assessment
This issue has not been assessed yet.