Agreed with Cédric, as JSR-223 is really too brained-down to be really useful.
It's still however possible to cast the Groovy javax script engine to its concrete implementation class, and then you can access the underlying GroovyClassLoader used, and set the CompilerConfiguration to what you want.
But you're now tied to the specifics of the Groovy implementation of JSR-233.
I had a customer that really wanted to use JSR-223/javax.script, but had to worrkound that way to such things as customize the imports and more. They had come up with this solution.