IntelliJ doesnt resolve gradle dependencies.

I'm not sure if this is a bug or if i'm doing something wrong... I have a gradle project, with two submodules, each with an identical build.gradle, that looks like this:

 
apply plugin: 'java'

sourceCompatibility = 1.8
version = '1.0'

repositories {
    mavenCentral()
}

dependencies {
    compile 'org.jogamp.gluegen:gluegen-rt-main:2.2.4'
    compile 'org.jogamp.jogl:jogl-all-main:2.2.4'
    compile 'org.jogamp.jocl:jocl:2.2.4'
    compile 'org.jogamp.jocl:jocl-main:2.2.4'
}



The gradle project builds and runs perfectly, when i do it from commandline (or when i run the gradle build command from IntelliJ), but IntelliJ doesnt recognize any imports from the used dependencies, for instance:

 
import com.jogamp.opengl.util.FPSAnimator;


Does anyone know a solution for this, or is it a bug? I've tried, removing all IntelliJ files, Gradle caches and re-importing the project, but the problem persists. I'm using the latest version of Intellij Ultimate 14.0

P.S. Could the problem be, that dependencies are 'org.jogamp.....' and the imports are 'com.jogamp....' ?

Edit: if i make a non-gradle project in IntelliJ and add the maven dependencies as libraries, it works as it should.

Please sign in to leave a comment.