Commit ad5ba2e4 authored by Andy Wilkinson's avatar Andy Wilkinson

Compile Kotlin code will all warnings treated as errors

Closes gh-26083
parent e445179f
...@@ -25,8 +25,11 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile; ...@@ -25,8 +25,11 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile;
* plugin. When the plugin is applied: * plugin. When the plugin is applied:
* *
* <ul> * <ul>
* <li>{@link KotlinCompile} tasks are configured to use {@code apiVersion} and * <li>{@link KotlinCompile} tasks are configured to:
* {@code languageVersion} 1.3. * <ul>
* <li>Use {@code apiVersion} and {@code languageVersion} 1.3.
* <li>Treat all warnings as errors
* </ul>
* </ul> * </ul>
* *
* <p/> * <p/>
...@@ -41,6 +44,7 @@ class KotlinConventions { ...@@ -41,6 +44,7 @@ class KotlinConventions {
KotlinJvmOptions kotlinOptions = compile.getKotlinOptions(); KotlinJvmOptions kotlinOptions = compile.getKotlinOptions();
kotlinOptions.setApiVersion("1.3"); kotlinOptions.setApiVersion("1.3");
kotlinOptions.setLanguageVersion("1.3"); kotlinOptions.setLanguageVersion("1.3");
kotlinOptions.setAllWarningsAsErrors(true);
}); });
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment