On Thu, Mar 27, 2014 at 1:35 AM, Adam Murdoch <adam.murd...@gradleware.com>wrote:
> > On 27 Mar 2014, at 11:25 am, Kallin Nagelberg <kallin.nagelb...@gmail.com> > wrote: > > Hey there, > > I'm looking to contribute some work on the intellij plugin, and am having > difficulties building gradle in intellij itself. > > The problem is that 'InProcessGradleExecuter' of the > 'internalIntegTesting' project depends on 'TestFiles' of 'core'. However, > testfiles is a test file, and so inprocessgradleexecutor doesn't see it in > intellij since it's a main source. > > I can workaround this by operating on the command line, but running tests > in the IDE would make my life easier. Anyone else encounter this? > > > I think everyone encounters this, and everyone has a different magic > incantation to make it work. Here's what I do: > > - run ./gradlew idea > - open the project in IDEA. I'm using IDEA 12, I've not managed to get 13 > to work yet. > - open the project preferences, and for the 'internalIntegTesting' and > 'internalTesting' projects change the production source directories so that > they are test source directories instead. > - run build in IDEA. I usually have to run this a couple of times for it > to work. > > Following this, things seem to work fine. Until they don't, when you start > again. Sometimes you need to rebuild in IDEA, sometimes not. > > I just tried this with IntelliJ IDEA 13.1.2 EAP build 135.666 and Adam's steps work for me. One more thing: add more memory to groovyc. 1600M is enough. You can try less. I will update README.md for https://github.com/gradle/gradle and look if we can change internal*Testing sources from production to testing automatically. And yes, the auto-import is broken in that version :-( And if you happen to associate the project with IJ Gradle support it is hard to unlink it. At least I was not able to do it ( https://www.jetbrains.com/idea/webhelp/working-with-gradle-projects.html). As a result I deleted .idea directory, followed what Adam wrote above (open gradle.ipr not the directory) and it works. -Radim > > -- > Adam Murdoch > Gradle Co-founder > http://www.gradle.org > VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting > http://www.gradleware.com > > Join us for Gradle Summit 2014, June 12th and 13th in Santa Clara, CA: > http://www.gradlesummit.com > >