Refactor: make languageVersion configuration parameter common for jvm and js kotlin maven compiler plugin.

This commit is contained in:
Ilya Gorbunov
2016-10-11 23:23:10 +03:00
parent 2a7717214b
commit ea51070446
2 changed files with 5 additions and 4 deletions
@@ -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) {
@@ -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);