|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Running Gradle 0.6.1 with Groovy 1.6.2I am trying to upgrade an existing project that was built with Gradle 0.5.2 to 0.6.1. Our install of 0.5.2 is using the embedded groovy jar from version 1.6.2 instead of the one it was distributed with to get a few more useful functions. It was running fine. I tried upgrading and ran into major issues.
I traced these down and set up a simple build.gradle script on a test project with just one line: usePlugin('java') I get the following output from gradle: Build failed with an exception. Run with -s or -d option to get more details. Run with -f option to get the full (very verbose) stacktrace. Build file '/home/gshafranovich/eclipse-workspaces/test/build/build.gradle' line: 1 A problem occurred evaluating root project 'build'. Cause: org.codehaus.groovy.reflection.CachedClass.getCachedClass()Ljava/lang/Class; BUILD FAILED I think this is because the return type of CachedClass.getCachedClass() has changed from java.lang.Class to CachedClass in groovy 1.6.2. I am going to hold off on upgrading until Gradle would be compatible with a later version of groovy. Does anyone have any suggestions on whether my assumption are correct or not? |
|
|
Re: Running Gradle 0.6.1 with Groovy 1.6.2On Jun 3, 2009, at 8:53 PM, Gennadiy Shafranovich wrote: > I am trying to upgrade an existing project that was built with > Gradle 0.5.2 to 0.6.1. Our install of 0.5.2 is using the embedded > groovy jar from version 1.6.2 instead of the one it was distributed > with to get a few more useful functions. It was running fine. I > tried upgrading and ran into major issues. > > I traced these down and set up a simple build.gradle script on a > test project with just one line: > > usePlugin('java') > > I get the following output from gradle: > > Build failed with an exception. > Run with -s or -d option to get more details. Run with -f option to > get the full (very verbose) stacktrace. > > Build file '/home/gshafranovich/eclipse-workspaces/test/build/ > build.gradle' line: 1 > > A problem occurred evaluating root project 'build'. > Cause: > org.codehaus.groovy.reflection.CachedClass.getCachedClass()Ljava/ > lang/Class; > > BUILD FAILED > > I think this is because the return type of > CachedClass.getCachedClass() has changed from java.lang.Class to > CachedClass in groovy 1.6.2. > > I am going to hold off on upgrading until Gradle would be compatible > with a later version of groovy. Does anyone have any suggestions on > whether my assumption are correct or not? It would be very helpful to see the buildscript. Or at least the parts where the plugin and the dependencies are declared. - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Running Gradle 0.6.1 with Groovy 1.6.2Hans,
Because I thought the rest of my build logic was messing up with gradle 0.6.1 i just created a test project on the side. All its build.gradle file contains is the usePlugin line. So its a single line build script with one hello world class file in src/main/java. Hope this helps, and btw, we've been very happy with Gradle on our project after trying gant and other alternatives. We use it for the main build, bamboo integration, and even putting together mySql initialization scripts and pushing those to the database right before the tests happen. The 0.6 version looks like it fixes some of the quirks we had to put in to our build script and is the main reason why I was trying to upgrade :) - Gennadiy On Thu, Jun 4, 2009 at 3:33 AM, Hans Dockter <mail@...> wrote:
|
|
|
Re: Running Gradle 0.6.1 with Groovy 1.6.2On Jun 4, 2009, at 12:38 PM, Gennadiy Shafranovich wrote: > Hans, > > Because I thought the rest of my build logic was messing up with > gradle 0.6.1 i just created a test project on the side. All its > build.gradle file contains is the usePlugin line. So its a single > line build script with one hello world class file in src/main/java. > > Hope this helps, and btw, we've been very happy with Gradle on our > project after trying gant and other alternatives. We use it for the > main build, bamboo integration, and even putting together mySql > initialization scripts and pushing those to the database right > before the tests happen. The 0.6 version looks like it fixes some of > the quirks we had to put in to our build script and is the main > reason why I was trying to upgrade :) > > - Gennadiy > > On Thu, Jun 4, 2009 at 3:33 AM, Hans Dockter <mail@...> wrote: > > On Jun 3, 2009, at 8:53 PM, Gennadiy Shafranovich wrote: > > I am trying to upgrade an existing project that was built with > Gradle 0.5.2 to 0.6.1. Our install of 0.5.2 is using the embedded > groovy jar from version 1.6.2 instead of the one it was distributed > with to get a few more useful functions. It was running fine. I > tried upgrading and ran into major issues. > > I traced these down and set up a simple build.gradle script on a > test project with just one line: > > usePlugin('java') I think I understand. What you are doing is to replace the groovy version of the GRADLE_HOME/lib folder? You do this to enable Groovy 1.6 features in your build.gradle? You might run into issues by doing this. What you could try is to clean the build script cache (you only need to do this once): gradle -C rebuild <someTask> - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Running Gradle 0.6.1 with Groovy 1.6.2Hans,
You are correct, I am replacing the groovy jar inside the gradle/lib dir with the 1.6.2 groovy embedded jar. I tried the gradle -C rebuild and it doesn't seem to help. Like i mentioned earlier i think the problem stems from the fact that gradle has been compiled with groovy 1.5.6 and expects CachedClass.getCachedClass() to return java.lang.Class. I looked at the groovy source and the return type for that class has changed to CachedClass from java.lang.Class from 1.5.6 release to 1.6.2. Is there any plan for a future release of gradle to be compiled with the newest groovy version? Also, i am including the test project so that you can recreate what is happening. Just running gradle clean on this project with gradle 0.6.1 installed (and the groovy jar changed to groovy-all-1.6.2.jar) causes the no method found exception. Thanks On Thu, Jun 4, 2009 at 8:12 AM, Hans Dockter <mail@...> wrote:
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Running Gradle 0.6.1 with Groovy 1.6.2On Jun 4, 2009, at 7:56 PM, Gennadiy Shafranovich wrote: > Hans, > > You are correct, I am replacing the groovy jar inside the gradle/lib > dir with the 1.6.2 groovy embedded jar. I tried the gradle -C > rebuild and it doesn't seem to help. Like i mentioned earlier i > think the problem stems from the fact that gradle has been compiled > with groovy 1.5.6 and expects CachedClass.getCachedClass() to return > java.lang.Class. I looked at the groovy source and the return type > for that class has changed to CachedClass from java.lang.Class from > 1.5.6 release to 1.6.2. > > Is there any plan for a future release of gradle to be compiled with > the newest groovy version? Yes. But the problem is not just compilation. Groovy 1.6 is not fully backwards compatible so we have to do some programmatic changes in Gradle to make it fully work with Groovy 1.6. We plan to do this for our next release. - Hans -- Hans Dockter Gradle Project Manager http://www.gradle.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Running Gradle 0.6.1 with Groovy 1.6.2Gennadiy Shafranovich schrieb:
> Hans, > > You are correct, I am replacing the groovy jar inside the gradle/lib dir > with the 1.6.2 groovy embedded jar. I tried the gradle -C rebuild and it > doesn't seem to help. Like i mentioned earlier i think the problem stems > from the fact that gradle has been compiled with groovy 1.5.6 and > expects CachedClass.getCachedClass() to return java.lang.Class. I looked > at the groovy source and the return type for that class has changed to > CachedClass from java.lang.Class from 1.5.6 release to 1.6.2. that change was in 1.6 beta1 already... 1 year ago. bye blackdrag -- Jochen "blackdrag" Theodorou The Groovy Project Tech Lead (http://groovy.codehaus.org) http://blackdragsview.blogspot.com/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |