Project compiles under IDEA 14 and command line but won't compile under IDEA 15

Answered

I'm migrating to a new machine, and, in the process, I decided to install the latest version of IDEA.  Please see my version specifics below.

IntelliJ IDEA 2016.1.1

Build #IU-145.597, built on March 29, 2016

JRE: 1.8.0_40-release-b132 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Our project is a multi-module gradle based project.  I have test class dependencies among modules.  For example, We have a util module with with a class TestHelper.  We have another module called customers with test classes that reference the TestHelper class in util.  In my customers module's build.gradle, I have the following dependencies defined:

dependencies {
compile project (':util')
testCompile project(path: ':util', configuration: 'tests')
}

 

When I build and run from the command line on my new machine using './gradlew clean build test', everything compiles without issue.  However, when I try to build and from IDEA (even without building, I see errors in the editor), I get errors in all of my test classes that reference test classes from other modules.  I've tried quitting and restarting IDEA, invalidating caches, doing a gradle clean from the command line, and using the Rebuild Project in IDEA all without success.  Does anyone have any suggestions?

3 comments

Serge,

Thank you very much for the feedback.  I installed the EAP as requested, but I am unfortunately seeing the same problems.  I also installed IDEA 14 on my new machine, and the problems persist.  There's obviously something else different on my new machine.  I've verified that I am on the tip of the same branch on both my old and new machines.  The major difference between the old and new machines is that the new machine is El Capitan and the old is Yosemite.  I doubt that is having any impact on this particular issue.  Other differences include slightly newer versions of Java SDKs (same major versions, but different minor updates).  Again, with the EAP and IDEA 14, I've tried invalidating caches, restarting, hitting the recycle button on the Gradle pane to refresh the project, etc.  If you have any other suggestions, I'm all ears.

0

This is getting very confusing.  Here's where I'm at at this point.  I have things working under IDEA 14 on my new machine.  IDEA wants to do very different things depending on how I open/import the project.  Correctly or incorrectly, on my old machine, it appears that I am always "opening" a top level .iml file for the project.  When I do that on my new machine in IDEA 14, all the dependencies seem to resolve just fine, and I can compile and run my tests.  If I try "opening" the top level directory or re-importing the project from the top level build.gradle file, I run into the test class dependency problems.  I'm not really sure what's the right way to do this, but at least I'm able to work again.

0

Please sign in to leave a comment.