the arguments for Groovy don't work

I want to use --configscript in Groovy. Below are the config file config.groovyimport org.codehaus.groovy.control.customizers.ImportCustomizerdef imports = new ImportCustomizer()imports.addStaticStars('java.lang.Math')configuration.addCompilationCustomizers(imports)The script file is TestImporter.groovy, content is:package com.testprintln(sin(PI/2))It will run successfully in groovy command line like: groovy --configscript config.groovy TestImporter.groovy but failed in IDEA. In the running configurations, I input --configscript config.groovy in Script parameters but still failed.  Can you check why? Thanks.
0

In Groovy we can add a method named call to a class and then invoke the method without using the name call . We would simply just type the parentheses and optional arguments on an object instance. Groovy calls this the call operator: () . This can be especially useful in for example a DSL written with Groovy.  UMR Provider Portal

0

请先登录再写评论。