kotlin-maven-plugin: Add apiVersion parameter linked with kotlin.compiler.apiVersion property.

Test apiVersion parameter is applied as explicitly and as implicitly inferred from languageVersion.
 #KT-14298
This commit is contained in:
Ilya Gorbunov
2016-10-12 04:03:32 +03:00
parent ea51070446
commit 2c9b2652c1
8 changed files with 87 additions and 1 deletions
@@ -114,6 +114,10 @@ public abstract class KotlinCompileMojoBase<A extends CommonCompilerArguments> e
@Parameter(property = "kotlin.compiler.languageVersion", required = false, readonly = false)
protected String languageVersion;
@Parameter(property = "kotlin.compiler.apiVersion", required = false, readonly = false)
protected String apiVersion;
/**
* Additional command line arguments for Kotlin compiler.
*/
@@ -222,6 +226,7 @@ public abstract class KotlinCompileMojoBase<A extends CommonCompilerArguments> e
arguments.suppressWarnings = nowarn;
arguments.languageVersion = languageVersion;
arguments.apiVersion = apiVersion;
getLog().info("Compiling Kotlin sources from " + sources);