Use the following command to execute groovysh task in the context of the project. The project
, settings
and gradle
bindings are set.
> .\gradlew -q --no-daemon --console=plain --init-script groovysh-task.gradle groovysh
...
...
groovy:000> :inspect project
groovy:000> :inspect settings
groovy:000> :inspect gradle
BTW this is implemented by VSCode extension:
Extend Gradle for Java extention
Once the PR refered to by the issue:
https://issues.apache.org/jira/browse/GROOVY-10661
lands in the groovy inside gradle, you will be able to launch ObjectBrowser
and drill down in any objects in the build to any depth you wish. The PR is already merged in the master branch of Groovy and will be available in next 4.x and 5.x release.
Someday I will submit a PR to use a TreeTable UI instead of a Table UI for ObjectBrowser. This will avoid proliferation of windows. Instead we will be able to expand Tree nodes of TreeTable to drill down.
Actually this has been implemented in: