From a740cb570aaf2e25d302b3b6eda4b58ca106e08c Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 27 May 2021 04:29:13 +0530 Subject: build: escalate warnings to errors Signed-off-by: Harsh Shandilya --- buildSrc/src/main/java/BaseProjectConfig.kt | 1 + buildSrc/src/main/java/PasswordStorePlugin.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/buildSrc/src/main/java/BaseProjectConfig.kt b/buildSrc/src/main/java/BaseProjectConfig.kt index 7666424c..808d428d 100644 --- a/buildSrc/src/main/java/BaseProjectConfig.kt +++ b/buildSrc/src/main/java/BaseProjectConfig.kt @@ -51,6 +51,7 @@ internal fun Project.configureForAllProjects() { } tasks.withType { kotlinOptions { + allWarningsAsErrors = true jvmTarget = JavaVersion.VERSION_1_8.toString() freeCompilerArgs = freeCompilerArgs + additionalCompilerArgs languageVersion = "1.5" diff --git a/buildSrc/src/main/java/PasswordStorePlugin.kt b/buildSrc/src/main/java/PasswordStorePlugin.kt index aa2f152f..5db8c893 100644 --- a/buildSrc/src/main/java/PasswordStorePlugin.kt +++ b/buildSrc/src/main/java/PasswordStorePlugin.kt @@ -38,6 +38,7 @@ class PasswordStorePlugin : Plugin { project.tasks.withType { options.compilerArgs.add("-Xlint:unchecked") options.isDeprecation = true + options.isWarnings = true } } is LibraryPlugin -> { -- cgit v1.2.3