title: IntelliJ + Kotlin + Gradle: How can I correct this error "Language version 1.5 is experimental"?
body: <p>I have a project that is using Kotlin 1.5 with Gradle 7 and IntelliJ 2021.1.1.  The project was originally based on Kotlin 1.4 and was recently upgraded to 1.5.</p>
  <p>When I build the project, I see the following warning, which seems to be related to the compileTestKotlin Gradle task.  There are no warnings for non-test compiles.  I have scoured through IntelliJ settings, Gradle configuration files, but to no avail.  I'd appreciate any help to resolve this warning...  Thank you for any help!</p>
  <blockquote>
  <p>Task :services:track:compileTestKotlin
  w: Language version 1.5 is experimental, there are no backwards compatibility guarantees for new language and library features</p>
  </blockquote>
  <p>Here are my compiler settings in Gradle:</p>
  <pre><code>tasks {
      withType&lt;org.jetbrains.kotlin.gradle.tasks.KotlinCompile&gt; {
          kotlinOptions {
              //allWarningsAsErrors = true // best practice
              apiVersion = &quot;1.5&quot;
              freeCompilerArgs += listOf(&quot;-Xjsr305=strict&quot;)
              jvmTarget = &quot;11&quot;
              languageVersion = &quot;1.5&quot;
          }
      }
  
      withType&lt;org.jetbrains.kotlin.gradle.dsl.KotlinCompile&lt;*&gt;&gt; {
          kotlinOptions {
              //allWarningsAsErrors = true // best practice
              apiVersion = &quot;1.5&quot;
              languageVersion = &quot;1.5&quot;
          }
      }
  }
  </code></pre>
  <p>IntelliJ Kotlin Configuration
  <a href="https://i.stack.imgur.com/lvmyb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lvmyb.png" alt="IntelliJ Kotlin Configuration" /></a></p>
  <p>The issue has been corrected.  The buildSrc folder contained a build.gradle.kts file that had Kotlin 1.4 dependencies.  I've changed them to 1.5, and the project builds properly.
  <a href="https://i.stack.imgur.com/r3H2N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r3H2N.png" alt="Kotlin Version Changes" /></a></p>