Maven: support jvmTarget parameter in Maven, linked to property kotlin.compiler.jvmTarget.
Gradle: support jvmTarget compiler option.
This commit is contained in:
+1
@@ -202,6 +202,7 @@ open class KotlinCompile() : AbstractKotlinCompile<K2JVMCompilerArguments>() {
|
||||
args.noParamAssertions = kotlinOptions.noParamAssertions
|
||||
args.moduleName = kotlinOptions.moduleName ?: extraProperties.getOrNull<String>("defaultModuleName")
|
||||
args.languageVersion = kotlinOptions.languageVersion
|
||||
args.jvmTarget = kotlinOptions.jvmTarget
|
||||
|
||||
fun addFriendPathForTestTask(taskName: String) {
|
||||
logger.kotlinDebug("try to determine the output directory of corresponding $taskName task")
|
||||
|
||||
+5
@@ -61,6 +61,9 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
|
||||
@Parameter(defaultValue = "${project.artifactId}-test", required = true, readonly = true)
|
||||
protected String testModuleName;
|
||||
|
||||
@Parameter(property = "kotlin.compiler.jvmTarget", required = false, readonly = false)
|
||||
protected String jvmTarget;
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected K2JVMCompiler createCompiler() {
|
||||
@@ -102,5 +105,7 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
|
||||
if (arguments.noOptimize) {
|
||||
getLog().info("Optimization is turned off");
|
||||
}
|
||||
|
||||
arguments.jvmTarget = jvmTarget;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user