Maven: support languageVersion parameter, linked to property kotlin.compiler.languageVersion.
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<kotlin.compiler.languageVersion>1.0</kotlin.compiler.languageVersion>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
@@ -56,12 +60,6 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-language-version</arg>
|
||||
<arg>1.0</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
+4
@@ -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.languageVersion", required = false, readonly = false)
|
||||
protected String languageVersion;
|
||||
|
||||
@Parameter(property = "kotlin.compiler.jvmTarget", required = false, readonly = false)
|
||||
protected String jvmTarget;
|
||||
|
||||
@@ -106,6 +109,7 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
|
||||
getLog().info("Optimization is turned off");
|
||||
}
|
||||
|
||||
arguments.languageVersion = languageVersion;
|
||||
arguments.jvmTarget = jvmTarget;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user