Maven: KT-17093 Import from maven: please provide a special tag for coroutine option

This commit is contained in:
Sergey Mashkov
2017-04-13 16:40:29 +03:00
parent 5010047b1b
commit 2521dacc25
3 changed files with 19 additions and 4 deletions
@@ -174,6 +174,13 @@ public abstract class KotlinCompileMojoBase<A extends CommonCompilerArguments> e
@Parameter(property = "kotlin.compiler.apiVersion", required = false, readonly = false)
protected String apiVersion;
/**
* possible values are: enable, error, warn
*/
@Parameter(property = "kotlin.compiler.experimental.coroutines", required = false, readonly = false)
@Nullable
protected String experimentalCoroutines;
/**
* Additional command line arguments for Kotlin compiler.
*/
@@ -447,6 +454,10 @@ public abstract class KotlinCompileMojoBase<A extends CommonCompilerArguments> e
arguments.apiVersion = apiVersion;
arguments.multiPlatform = multiPlatform;
if (experimentalCoroutines != null) {
compiler.parseArguments(new String[] { "-Xcoroutines=" + experimentalCoroutines }, arguments);
}
configureSpecificCompilerArguments(arguments);
try {