title: Intellij gradle sync error: scala import error
body: <p>I have updated my IntelliJ and the gradle sync outputs a warning which affects my IDE autocomplete.</p>
  
  <p>I have tried looking for this problem and I've tried some fixes with package versions or change from compile to implementation, but none have worked.
  Here is my gradle part that seems to generate the error.</p>
  
  <pre><code>allprojects {
      apply plugin: 'java'
      apply plugin: 'scala'
  
      group = 'com.adobe.platform.activation'
      sourceCompatibility = 1.8
  
      // Once we migrate to our own jenkins, this will be removed
      String gitBranch = System.getenv("GIT_BRANCH")
      if (gitBranch != null &amp;&amp; gitBranch != "master") {
          String version = version.toString()
          int dashIndex = version.lastIndexOf('-')
          String prefix = version.substring(0, dashIndex)
          String suffix = version.substring(dashIndex + 1)
          String newVersion = "$prefix-$gitBranch-$suffix"
                  .replace("/", "-")
                  .replace("_", "-")
  
          setVersion(newVersion)
      }
  }
  </code></pre>
  
  <p>The warning looks like this.</p>
  
  <pre><code>Warning:&lt;i&gt;&lt;b&gt;root project '....': Unable to build Scala project configuration&lt;/b&gt;
  Details: org.gradle.api.GradleException: Cannot infer Scala class path because no Scala library Jar was found. Does root project '...' declare dependency to scala-library? Searched classpath: file collection.&lt;/i&gt;
  </code></pre>