Too late for the party (any beer for me?) but here I´ll show you 2 more flavors:
1) Remember the concept of Java´s CLASSPATH? That aplies to Groovy (because Groovy is Java!):
"The CLASSPATH variable is one way to tell applications, including the JDK tools, where to look for user classes.”</p>
In order to run the script B.groovy you have to inform the location of the A.groovy (A class):
groovy –cp c:\groovy\yourscripts c:\groovy\scripts\B.groovy
The command above is telling the runtime to look in the c:\groovy\yourscripts folder because there is where we have our classes and we need them to run the B.groovy script successfully.
2) Use the GroovyClassLoader to load your scripts at runtime and using the code!
Both ways solve your needs. Now the next question is when to use each?