Expand description
Gradle classpath resolver.
Extracts classpath JARs from Gradle projects by writing a temporary init script
and executing gradlew --init-script <script> sqryListClasspath. Parses the
structured output lines to build ResolvedClasspath entries per module.
§Strategy
- Write a temporary init script that adds a
sqryListClasspathtask to all projects. - Locate
gradlew(orgradlew.baton Windows) in the project root, or fall back to installedgradle. - Execute the selected Gradle command with the init script. Timeout defaults to 60 seconds.
- Parse
SQRY_CP:<module>:<group>:<name>:<version>:<path>lines. - On failure or timeout, fall back to a cached
resolved-classpath.json.
§Security
Prefer the project’s own Gradle wrapper. If the wrapper is absent, sqry can
fall back to installed gradle; that path should be treated as less
reproducible and is logged explicitly.
Functions§
- resolve_
gradle_ classpath - Resolve classpath for a Gradle project.