Refactor: make languageVersion configuration parameter common for jvm and js kotlin maven compiler plugin.
This commit is contained in:
-4
@@ -56,9 +56,6 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
|
||||
@Parameter(defaultValue = "${project.artifactId}-test", required = true, readonly = true)
|
||||
protected String testModuleName;
|
||||
|
||||
@Parameter(property = "kotlin.compiler.languageVersion", required = false, readonly = false)
|
||||
protected String languageVersion;
|
||||
|
||||
@Parameter(property = "kotlin.compiler.jvmTarget", required = false, readonly = false)
|
||||
protected String jvmTarget;
|
||||
|
||||
@@ -110,7 +107,6 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
|
||||
getLog().info("Optimization is turned off");
|
||||
}
|
||||
|
||||
arguments.languageVersion = languageVersion;
|
||||
arguments.jvmTarget = jvmTarget;
|
||||
|
||||
if (jdkHome != null) {
|
||||
|
||||
+5
@@ -110,6 +110,10 @@ public abstract class KotlinCompileMojoBase<A extends CommonCompilerArguments> e
|
||||
@Parameter
|
||||
public String testModule;
|
||||
|
||||
|
||||
@Parameter(property = "kotlin.compiler.languageVersion", required = false, readonly = false)
|
||||
protected String languageVersion;
|
||||
|
||||
/**
|
||||
* Additional command line arguments for Kotlin compiler.
|
||||
*/
|
||||
@@ -217,6 +221,7 @@ public abstract class KotlinCompileMojoBase<A extends CommonCompilerArguments> e
|
||||
}
|
||||
|
||||
arguments.suppressWarnings = nowarn;
|
||||
arguments.languageVersion = languageVersion;
|
||||
|
||||
getLog().info("Compiling Kotlin sources from " + sources);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user