Customize Groovy Compiler

I would like to provide a custom compiler configuration to the Groovy compiler so that some Java packages are automatically imported and available to Groovy scripts during process execution. If anyone has any thoughts or experience about that please let me know. Thank you.