1

In my project, all Kotlin warnings are treated as errors. For that I use the following configuration:

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
    kotlinOptions {
        allWarningsAsErrors = true
    }
}

However, I want to ignore deprecation errors, the same way I'm already doing in Java with -Xlint:all,-deprecation

However, I can't find any documentation explaining how to do so.

I've tried using the following configuration but with no success:

freeCompilerArgs = ["-Xjavac-arguments=['-Xlint:all,-deprecation']"]

This was taken from here but it doesn't seem to work and deprecation warnings are still considered errors

Is there any option I can use to disable deprecation issues this?

Thanks

Pedro Oliveira
  • 20,442
  • 8
  • 55
  • 82
  • 1
    I asked this here - https://stackoverflow.com/questions/52488930/how-to-suppress-specific-kotlinc-javac-compiler-warnings. – Jared Burrows Mar 27 '20 at 05:58

0 Answers0