Colton Idle
11/13/2025, 6:22 AMallprojects {
allprojects {
tasks.withType(JavaCompile).tap {
configureEach {
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
}
}
}
}
I want to just delete it because i dont know what it does. this is in the root build file in an android project. No one on the team seems to know why it was needed, but people dont want to remove it 😂 the allprojects within allprojects is just weird to me. I'm not sure if these are even valid lint flags (what linter? android-lint? or does java have a linter?)René
11/13/2025, 6:51 AMColton Idle
11/13/2025, 6:56 AMallprojects {
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.addAll(listOf("-Xlint:deprecation", "-Xlint:unchecked"))
}
}
should do the trick?
or should I be doing
allprojects {
subprojects {
tasks.withType...
}
}René
11/13/2025, 7:01 AMColton Idle
11/13/2025, 7:04 AMVampire
11/13/2025, 7:56 AM-Xlint:deprecation makes the Java compiler complain (as warnings) about usage of deprecated methods and classes, -Xlint:unchecked does the same for unchecked casts.
But like always, better have it in some convention plugin that is applied to all relevant projects.Colton Idle
11/13/2025, 8:05 AMVampire
11/13/2025, 8:50 AMVampire
11/13/2025, 8:50 AMColton Idle
11/13/2025, 4:37 PM