azkaban-aplcache

Enable -Werror to prevent future compilation warnings (#1266) Documentation

7/10/2017 6:55:23 PM

Changes

build.gradle 9(+8 -1)

Details

build.gradle 9(+8 -1)

diff --git a/build.gradle b/build.gradle
index fad69a8..eec472b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -132,7 +132,7 @@ subprojects {
         test {
             // Set maxParallelForks to a large number and let gradle to force it to a the
             // max-workers number when needed.
-            maxParallelForks =  12
+            maxParallelForks = 12
         }
     }
 
@@ -145,6 +145,13 @@ subprojects {
     }
 
     /**
+     * Terminate compilation if warnings occur.
+     */
+    tasks.withType(JavaCompile) {
+        options.compilerArgs += ["-Werror"]
+    }
+
+    /**
      * Print test execution summary when informational logging is enabled.
      */
     test {