How to recompile with -Xlint:deprecation

To answer my own question, you need to add the following to your project-level build.gradle file:

allprojects {
    ...

    gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.compilerArgs << "-Xlint:deprecation"
        }
    }   
}

Leave a Comment