Skip to content

CloudAgentLoader hardcoded to Maven target/classes prevents Gradle support in Dev UI #421

@beingtech

Description

@beingtech

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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