|
|
|
@ -30,7 +30,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile;
|
|
|
|
|
* <ul>
|
|
|
|
|
* <li>{@link KotlinCompile} tasks are configured to:
|
|
|
|
|
* <ul>
|
|
|
|
|
* <li>Use {@code apiVersion} and {@code languageVersion} 1.6.
|
|
|
|
|
* <li>Use {@code apiVersion} and {@code languageVersion} 1.7.
|
|
|
|
|
* <li>Use {@code jvmTarget} 17.
|
|
|
|
|
* <li>Treat all warnings as errors
|
|
|
|
|
* <li>Suppress version warnings
|
|
|
|
@ -50,8 +50,8 @@ class KotlinConventions {
|
|
|
|
|
|
|
|
|
|
private void configure(KotlinCompile compile) {
|
|
|
|
|
KotlinJvmOptions kotlinOptions = compile.getKotlinOptions();
|
|
|
|
|
kotlinOptions.setApiVersion("1.6");
|
|
|
|
|
kotlinOptions.setLanguageVersion("1.6");
|
|
|
|
|
kotlinOptions.setApiVersion("1.7");
|
|
|
|
|
kotlinOptions.setLanguageVersion("1.7");
|
|
|
|
|
kotlinOptions.setJvmTarget("17");
|
|
|
|
|
kotlinOptions.setAllWarningsAsErrors(true);
|
|
|
|
|
List<String> freeCompilerArgs = new ArrayList<>(compile.getKotlinOptions().getFreeCompilerArgs());
|
|
|
|
|