Groovy path to current executable script
examples/groovy/current_script.groovy
def current_script = getClass().protectionDomain.codeSource.location.path println(current_script)
This will print the full path to the current Groovy script.

Published on 2019-04-20
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.
Comment on this post