I'm writing a number of scripts in groovy. And I need some kind of code reuse in my scripts. How can I do it?
- I can put this code in a class. But it is hardly to support solution - part of code is in the interpreted script and the other is in compiled class
- I can use 'evaluate', but I need reuse of a function, which has return value. I tried "evaluate" of functions definitions and it seems to be not working.
Can you recommend some approach of "include" of functions definitions in a script?
Thank you!