Is there an option to pass -J parameters to JavaCompile task?

Hi,

I need to pass -J parameters to javac process. Unfortunately, according to http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/javac.html#commandlineargfile -J is not supported with argument files.

Is there any way how to pass it directlty? Would it be possible to add it to CompileOptions?

Thank you.

Have a look at ‘CompileOptions#forkOptions’, which has properties such as ‘memoryMaximumSize’ and ‘jvmArgs’ (see Javadoc for details). Note that you’ll have to set ‘compileOptions.fork = true’ for this to take effect.

Thanks a lot.