mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Polish
See gh-26576
This commit is contained in:
parent
763e58e392
commit
a6dd97e40d
@ -16,6 +16,9 @@
|
||||
|
||||
package org.springframework.boot.build;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gradle.api.Project;
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions;
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile;
|
||||
@ -29,6 +32,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile;
|
||||
* <ul>
|
||||
* <li>Use {@code apiVersion} and {@code languageVersion} 1.3.
|
||||
* <li>Treat all warnings as errors
|
||||
* <li>Suppress version warnings
|
||||
* </ul>
|
||||
* </ul>
|
||||
*
|
||||
@ -45,6 +49,9 @@ class KotlinConventions {
|
||||
kotlinOptions.setApiVersion("1.3");
|
||||
kotlinOptions.setLanguageVersion("1.3");
|
||||
kotlinOptions.setAllWarningsAsErrors(true);
|
||||
List<String> freeCompilerArgs = new ArrayList<>(compile.getKotlinOptions().getFreeCompilerArgs());
|
||||
freeCompilerArgs.add("-Xsuppress-version-warnings");
|
||||
compile.getKotlinOptions().setFreeCompilerArgs(freeCompilerArgs);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user