Strategy for Gradle & IntelliJ to share buildDir--no warnings

Since Gradle 4, we are now getting this warning in our build:

Gradle now uses separate output directories for each JVM language, but this build assumes a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0
        at build_e4mipr5ux7gpwhlxo4qxqiqmr$_run_closure2$_closure8$_closure16.doCall(/Users/me/dev/projects/myproject/build.gradle:63)

Our project is a Scala & Node project. Because our Scala code takes a long time to compile, we need both Intellij and Gradle to share the same buildDir–that is if we run a full build on the command line, we like to be able to then instantly run the app from inside of IntelliJ without having to wait for a full compile again.

Given these needs, how should I be using Gradle, and how do I get rid of this warning?