mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Compile Kotlin code will all warnings treated as errors
Closes gh-26083
This commit is contained in:
parent
e445179f49
commit
ad5ba2e414
@ -25,8 +25,11 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile;
|
||||
* plugin. When the plugin is applied:
|
||||
*
|
||||
* <ul>
|
||||
* <li>{@link KotlinCompile} tasks are configured to use {@code apiVersion} and
|
||||
* {@code languageVersion} 1.3.
|
||||
* <li>{@link KotlinCompile} tasks are configured to:
|
||||
* <ul>
|
||||
* <li>Use {@code apiVersion} and {@code languageVersion} 1.3.
|
||||
* <li>Treat all warnings as errors
|
||||
* </ul>
|
||||
* </ul>
|
||||
*
|
||||
* <p/>
|
||||
@ -41,6 +44,7 @@ class KotlinConventions {
|
||||
KotlinJvmOptions kotlinOptions = compile.getKotlinOptions();
|
||||
kotlinOptions.setApiVersion("1.3");
|
||||
kotlinOptions.setLanguageVersion("1.3");
|
||||
kotlinOptions.setAllWarningsAsErrors(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user