I am using Gradle for a project. My build.gradle JUnit has a dependency, but every time I import the project again, it does not recognize the JUnit library and asks to add it to the classpath. This issue applies not only to JUnit, but also to other dependencies. Did I add JUnit to the wrong place?
PS: the project builds just fine, it's just an IDE (IntelliJ), which stands for everything red.
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}

source
share