I am trying to execute JRuby scripts in a Gradle task using the Java ScriptEngine.
The Gradle build script at https://gist.github.com/anonymous/5736377 displays all detected script engines (on my machine these are a JavaScript engine, which is available in the JDK by default, and a JRuby engine which is included in the classpath dependency “jruby-complete”).
However, when running the task “testScriptEngineViaImportedTask” that is implemented in the class “ScriptEngineTask” in the buildSrc directory (https://gist.github.com/anonymous/5736380), only the JavaScript engine is displayed. In consequence, in this task I cannot execute JRuby scripts.
What am I doing wrong here?