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.