I have read how to simply import a groovy file in another groovy script
I want to define common functions in one groovy file and call those functions from other groo
For late-comers, it appears that groovy now support the :load file-path command which simply redirects input from the given file, so it is now trivial to include library scripts.
It works as input to the groovysh & as a line in a loaded file:
groovy:000> :load file1.groovy
file1.groovy can contain:
:load path/to/another/file
invoke_fn_from_file();