Maven inline option support
This commit is contained in:
@@ -70,6 +70,11 @@
|
|||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<inline>
|
||||||
|
off
|
||||||
|
</inline>
|
||||||
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|||||||
+10
@@ -33,6 +33,7 @@ import org.jetbrains.jet.cli.common.messages.CompilerMessageLocation;
|
|||||||
import org.jetbrains.jet.cli.common.messages.CompilerMessageSeverity;
|
import org.jetbrains.jet.cli.common.messages.CompilerMessageSeverity;
|
||||||
import org.jetbrains.jet.cli.common.messages.MessageCollector;
|
import org.jetbrains.jet.cli.common.messages.MessageCollector;
|
||||||
import org.jetbrains.jet.cli.jvm.K2JVMCompiler;
|
import org.jetbrains.jet.cli.jvm.K2JVMCompiler;
|
||||||
|
import org.jetbrains.jet.lang.types.lang.InlineUtil;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -149,6 +150,13 @@ public abstract class KotlinCompileMojoBase extends AbstractMojo {
|
|||||||
*/
|
*/
|
||||||
public String testModule;
|
public String testModule;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Switch method inlining on/off: possible values are "on" and "off".
|
||||||
|
*
|
||||||
|
* @parameter
|
||||||
|
*/
|
||||||
|
public String inline;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() throws MojoExecutionException, MojoFailureException {
|
public void execute() throws MojoExecutionException, MojoFailureException {
|
||||||
getLog().info("Kotlin Compiler version " + KotlinVersion.VERSION);
|
getLog().info("Kotlin Compiler version " + KotlinVersion.VERSION);
|
||||||
@@ -295,6 +303,8 @@ public abstract class KotlinCompileMojoBase extends AbstractMojo {
|
|||||||
arguments.noJdkAnnotations = true;
|
arguments.noJdkAnnotations = true;
|
||||||
arguments.annotations = getFullAnnotationsPath(log, annotationPaths);
|
arguments.annotations = getFullAnnotationsPath(log, annotationPaths);
|
||||||
log.info("Using kotlin annotations from " + arguments.annotations);
|
log.info("Using kotlin annotations from " + arguments.annotations);
|
||||||
|
arguments.enableInline = inline;
|
||||||
|
log.info("Method inlining is " + InlineUtil.optionToInlineFlag(arguments.enableInline));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getFullAnnotationsPath(Log log, List<String> annotations) {
|
protected String getFullAnnotationsPath(Log log, List<String> annotations) {
|
||||||
|
|||||||
Reference in New Issue
Block a user