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:
modelproject 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.
pluginproject is a plugin which will be injected to builds via the Tooling API, in order to register the custom model builder
inspectorproject is the main application which will call our model builder on any build
The 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:
- install the application using
- execute it using
You can pass an extra argument to the inspector, the path to any Gradle build, which will dump the artifact list for any build.