Hi all, I forgot to mention that it's been developed against 0.8 so I'm not sure how much it will need to change for 0.9. It's also in a bit of a "works for me" state but at least you don't have to start from scratch if you want to use it for ideas (or contribute, or take it over etc).
I've ripped it out of my local repository (pretty much as is) and uploaded it to: http://code.google.com/p/gwt-gradle-plugin/. It currently needs the GRADLE_HOME environment variable to be set for the build to work. The plugin supports both an "App" mode and "Lib" mode, in the later the all sources are included in the jar. I'm using it http://code.google.com/p/gwt-pectin/ if you want to see it in action. The main code uses the lib plugin and the demo uses the app plugin. It's been a while since I wrote it, but by default the TestGWT task scans for TestSuites to run (under src/main/gwtTest). I can't remember exactly why I don't scan for indiviual tests but I think it was for performance reasons. Also GWT complains about the test suite so you need to add something like the following to your test module. <!-- This stops the compiler trying to compile the GWTTestSuite and complaining about not finding any source. See: http://groups.google.com/group/Google-Web-Toolkit/msg/e76707d1c50fad76 --> <source path="client" excludes="**/*TestSuite.java" /> Hope this helps. Cheers Andrew On 11 June 2010 01:46, Marc Guillemot <[email protected]> wrote: > Hi Andrew, > > I'm really interested by what you've done. If you can send it to me or > publish it somewhere, it would be really welcome. > > I've tested the gwt plugin you mention and it has exactly the same problem > than I have locally. With one single GWT test, everything is fine. If I just > duplicate the sample GWT test to have 2 GWT unit tests then the second one > that gets executed fails with: > > sample.QuickStartTest.JUnit:sample.client.QuickStartTest2.testButton: could > not instantiate the requested class > > > Cheers, > Marc. > -- > Blog: http://mguillem.wordpress.com > > > Andrew Pietsch wrote: > >> Hi Marc, >> >> I'm using gradle to build GWT projects (both libraries and apps) and it's >> working for me. I created a seperate source set under src/gwtTest/java and >> put them under there. I've written a plugin to do it, happy to share if you >> want more info. >> There's also a gwt plugin at http://code.google.com/p/gradle-gwt-plugin/but >> I don't know what status it's in. >> >> Cheers >> Andrew >> >> On 9 June 2010 18:01, Marc Guillemot <[email protected] <mailto: >> [email protected]>> wrote: >> >> Hi, >> >> I've problems running my GWT unit tests (the ones extending >> GWTTestCase) with Gradle. The first unit test run always pass but >> GWT complains for the following ones. >> >> Does someone use gradle to build a GWT project and particularly to >> run the (GWT) unit tests? >> >> Cheers, >> Marc. >> -- Blog: http://mguillem.wordpress.com >> > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >
