title: How to output deprecation warnings for Kotlin code?
body: <p>I am using the following configuration snippet in my Java/Kotlin Android project in the <em>app/build.gradle</em> file:</p>
  
  <pre><code>gradle.projectsEvaluated {
      tasks.withType(JavaCompile) {
          options.compilerArgs &lt;&lt; "-Xlint:unchecked" &lt;&lt; "-Xlint:deprecation"
      }
  }
  </code></pre>
  
  <p>It generates a verbose output of Lint warnings in <em>.java</em> files when the project is compiled.<br>
  I would like to achieve the same for <em>.kt</em> files. I found out that Kotlin has <a href="https://kotlinlang.org/docs/reference/using-gradle.html#compiler-options" rel="nofollow noreferrer">compiler options</a>:</p>
  
  <pre><code>gradle.projectsEvaluated {
      tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
          kotlinOptions {
              freeCompilerArgs = ["-Xlint:unchecked", "-Xlint:deprecation"]
          }
      }
  }
  </code></pre>
  
  <p>However the compiler flags are not supported:</p>
  
  <blockquote>
    <p>w: Flag is not supported by this version of the compiler: -Xlint:unchecked<br>
    w: Flag is not supported by this version of the compiler: -Xlint:deprecation</p>
  </blockquote>
  
  <p>How can I output deprecation warnings for Kotlin code?</p>