IntelliJ forgets Gradle testCompile classpath entries on relaunch

Whenever I relaunch IntelliJ, it asks me to re-add test dependencies like JUnit and Cucumber, specified in build.gradle, to the classpath. How can I configure IntelliJ to automatically load these from the build.gradle file?

Please sign in to leave a comment.