A demonstration of the Gradle Tooling API: inspecting Gradle builds to get some information about them
APACHE-2.0 License
A simple demo of the Gradle Tooling API with a custom model. This model will retrieve the list of all artifacts produced by the target build.
The project consists of 3 subprojects:
model
project is our custom Tooling API model, which will store what we want to know about the build. In particular, here, we want to know about the artifacts.plugin
project is a plugin which will be injected to builds via the Tooling API, in order to register the custom model builderinspector
project is the main application which will call our model builder on any buildThe Tooling API will use whatever Gradle version is declared in the project, if it uses the Gradle wrapper.
You can test this custom model builder in two steps:
./gradlew install
inspector/build/install/inspector/bin/inspector
You can pass an extra argument to the inspector, the path to any Gradle build, which will dump the artifact list for any build.