How do I embed knowledge of a Gradle build into an arbitrary application?

I’d like to be able to point a tool at a directory and have the Gradle system bootstrap enough to figure out what’s going on in the build. I want to look at what dependencies are defined, what subprojects, etc…

I’ve been looking through the source trying to find the minimum configuration I need to bootstrap a build but not actually perform the build, just parse the configuration. Where should I look for that code?

You’ll probably want to use the tooling API for that. I recommend to check out the tooling API samples in the full Gradle distribution.