Why does Intellij IDEA not recognise test dependencies within Gradle project?

Answered

I have a (very!) simple Gradle project that uses JUnit as a dependency.  Intellisense in 2019.3 shows the imports as unrecognised (in red), yet the project will build correctly without a problem.  The project builds and tests correctly using Gradle.

 

Here is the project showing the problem: https://github.com/john-tipper/intellij-bugreport

Here is what I see:

 

1
2 comments

Hello,

Have you tried to run "File | Invalidate Caches" and "Reimport" from Gradle tool window?

0
Avatar
Permanently deleted user

Yes, I've tried invalidate and restart, then reimporting the project. I've tried deleting the .idea folder. I've tried restarting my computer. Nothing works.The project I linked to shows the problem. The issue exists on Ultimate versions 2019.3.2 & 2019.3.3.

1

Please sign in to leave a comment.