How to add -Xlint:unchecked to my Android Gradle based project?

前端 未结 7 885
囚心锁ツ
囚心锁ツ 2020-11-29 16:05

I tried to add the following to the root build.gradle file:

subprojects {
    gradle.projectsEvaluated {
        tasks.withType(Compile) {
              


        
7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-29 16:21

    For deprecation, you can now use this in gradle kotlin script, which is better than modifying compilerArgs because it's type-safe:

    tasks.withType {
        options.isDeprecation = true
    }
    

提交回复
热议问题