gradle-gaelyk-plugin icon indicating copy to clipboard operation
gradle-gaelyk-plugin copied to clipboard

Allow to set groovyc target version

Open shamoh opened this issue 12 years ago • 6 comments

Currently I can not set target or source attribute on ant.groovyc task - gaelykPrecompileGroovlet, gaelykPrecompileTemplate.

And when I run gaeRun task with --debug switch I see "Annotations are not supported in the current runtime. Please make sure you are running on a JVM >= 1.5" on command output.

It is just in case "-Dgroovy.target.bytecode=1.6" switch is used. I used that switch because I am looking for fixing of following bug: Application with groovy sources placed in src/main/groovy works correctly. When I place same groovy sources to src/main/webapp/WEB-INF/groovy I got: "The class XYZ refers to the class XYZ and uses 1 parameters, but the referred class takes no parameters". And mentioned switch "groovy.target.bytecode" I used to set target jdk version of "hot-deploy"/rad Groovy Script recompiller.

shamoh avatar Dec 23 '12 09:12 shamoh

I think the problem could be renamed to Groovy precompilation task do use the Gradle target and source Java versions because I suppose that's the real problem

musketyr avatar Dec 25 '12 08:12 musketyr

@bmuschko could you have look on this issue? it's probably causing some nasty bugs w/ 1.7

musketyr avatar Mar 04 '13 10:03 musketyr

We should probably automatically reuse the values of the properties sourceCompatibility in the template project. I'd assume that you use 1.6 in this case right?

bmuschko avatar Mar 04 '13 12:03 bmuschko

yeah, would be nice, sourceCompatibility and targetCompatilibility will be taken from JavaPlugin but I'm not sure, how to do it.

musketyr avatar Mar 04 '13 12:03 musketyr

OK, sounds good. I will put in a fix tonight.

bmuschko avatar Mar 04 '13 12:03 bmuschko

great, thx!

musketyr avatar Mar 04 '13 13:03 musketyr