commit | 3c03eb79ecb4ee75054d235368cd3d2ff73e5147 | [log] [tgz] |
---|---|---|
author | Eric Anderson <ejona@google.com> | Sun Jul 10 11:40:12 2016 -0700 |
committer | Eric Anderson <ejona@google.com> | Sun Jul 10 12:01:07 2016 -0700 |
tree | c68c39fd24681a481e1efd8871d0c4b2a4f50da0 | |
parent | 7fb43d2a1eb5e9718f4cc2dbc61466011ab27182 [diff] [blame] |
travis,jenkins: Fail build if javac emits warnings
diff --git a/build.gradle b/build.gradle index 8c8b647..e1f75db 100644 --- a/build.gradle +++ b/build.gradle
@@ -32,6 +32,9 @@ [compileJava, compileTestJava].each() { it.options.compilerArgs += ["-Xlint:all", "-Xlint:-options"] it.options.encoding = "UTF-8" + if (rootProject.hasProperty('failOnWarnings') && rootProject.failOnWarnings.toBoolean()) { + it.options.compilerArgs += ["-Werror"] + } } compileTestJava {