зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1457255 - 3. Turn Java warnings into errors; r=nalexander
Turn Java warnings into errors except for the deprecation and serial warnings. This is done for all Gradle projects except the thirdparty project.
This commit is contained in:
Родитель
0ce1010182
Коммит
a1549b47c7
18
build.gradle
18
build.gradle
|
@ -99,7 +99,23 @@ if ('multi' == System.env.AB_CD) {
|
|||
}
|
||||
|
||||
afterEvaluate {
|
||||
subprojects {
|
||||
subprojects { project ->
|
||||
if (project.name != 'thirdparty') {
|
||||
tasks.withType(JavaCompile) {
|
||||
// Add compiler args for all code except third-party code.
|
||||
options.compilerArgs += [
|
||||
// Turn on all warnings, except...
|
||||
"-Xlint:all",
|
||||
// Deprecation, because we do use deprecated API for compatibility.
|
||||
"-Xlint:-deprecation",
|
||||
// Serial, because we don't use Java serialization.
|
||||
"-Xlint:-serial",
|
||||
// Turn all remaining warnings into errors,
|
||||
// unless marked by @SuppressWarnings.
|
||||
"-Werror"]
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasProperty('android')) {
|
||||
return
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче