Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to set groovyc target version #32

Open
shamoh opened this issue Dec 23, 2012 · 6 comments
Open

Allow to set groovyc target version #32

shamoh opened this issue Dec 23, 2012 · 6 comments

Comments

@shamoh
Copy link

shamoh commented Dec 23, 2012

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.

@musketyr
Copy link
Contributor

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
Copy link
Contributor

musketyr commented Mar 4, 2013

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

@bmuschko
Copy link
Member

bmuschko commented Mar 4, 2013

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?

@musketyr
Copy link
Contributor

musketyr commented Mar 4, 2013

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

@bmuschko
Copy link
Member

bmuschko commented Mar 4, 2013

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

@musketyr
Copy link
Contributor

musketyr commented Mar 4, 2013

great, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants