I have a libGDX game project for Android, and I want to execute a Groovy script in it.
To do so, I am examining this example code: https://github.com/melix/grooidshell-example
They managed to execute Groovy embed in Java on Android. Particularly GrooidShell.java
(https://github.com/melix/grooidshell-example/blob/master/GroovyDroid/src/main/java/me/champeau/groovydroid/GrooidShell.java)
I have managed to implement most of the code in the Android launcher of the libGDX project. However, I cannot run it because I am missing two arguments:
public GrooidShell(File tmpDir, ClassLoader parent) {
The first one can be any directory. And the second one, I don't even know what is it for.
My question is, what is the ClassLoader
and File
arguments supposed to be? I need to get them and use them in the AndroidLauncher
class of libGDX, which is like this:
public class AndroidLauncher extends AndroidApplication {
@Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
initialize(new MyGdxGame(), config);
}
}