Run Groovy Shell in the context of a Gradle build

Sandip Chitale
Jun 27, 2022

--

Won’t it be cool if one could interactively explore the Gradle build context? The wait is over. Using the following Gist you can do exactly that. Scroll down to see the init script.

Using the :inspect command of groovysh you can launch the ObjectBrowser to inspect the objects starting at project, settings, gradle in ObjectBrowser GUI.

The Gradle init script mentioned in the command below — gradle-groovysh-init.gradle can be found at the bottom of the post.

--

--