Including a groovy script in another groovy

evaluate(new File("../tools/Tools.groovy"))

Put that at the top of your script. That will bring in the contents of a groovy file (just replace the file name between the double quotes with your groovy script).

I do this with a class surprisingly called “Tools.groovy”.

Leave a Comment