Make and Build project compilation errors, standalone Gradle compilation is fine, import from Gradle mark 'compilation dependencies' as 'runtime dependencies' on Linux:

Answered

Hello all,

I'm using IntelliJ IDEA 2016.1.1 on RedHat Linux with Oracle JDK 1.8.0_76-release-b18 and I cannot compile any of the Gradle modules (*_main) in IDEA. If I run an external gradle build that works but for some reason the Make or rebuild project cannot fix this issue.

Any ideas how I can debug what is going on (I turned the log level to DEBUG on build-log.properties file) but the output is not helpfull. Also I can open the missing classes using (Ctrl+N) so the code is definitely there.

 What I found is that for some reason when IDEA imported the project from Gradle it marked A LOT of the dependencies as runtime instead of compilation. The dependency declaration is fine on the standalone build.gradle files for each module.

 

There is anything I need to run, like gradle idea, or IDEA should be able to figure out the correct dependency type on its own?

Thanks in advance (Trying to be ex-eclipse user :-))

3 comments
Comment actions Permalink

Please reimport the project with the new build from https://confluence.jetbrains.com/display/IDEADEV/IDEA+2016.1+EAP.

If the issue persists, submit a bug at https://youtrack.jetbrains.com/issues/IDEA and attach a sample project to reproduce the problem.

The latest build has the new option, see if it makes any difference:

0
Comment actions Permalink

I'm having the same issue on IntelliJ IDEA 2016.2.2. Checking "Create separate module per source set" did not help.

0
Comment actions Permalink

Please submit a bug at https://youtrack.jetbrains.com/issues/IDEA with a sample project.

0

Please sign in to leave a comment.