Module name parameter added to ant tasks

This commit is contained in:
Michael Bogdanov
2015-09-02 09:29:38 +03:00
parent d015f713cb
commit 4853e4f1cc
2 changed files with 10 additions and 0 deletions
@@ -25,6 +25,7 @@ public class Kotlin2JvmTask : KotlinCompilerBaseTask() {
public var externalAnnotations: Path? = null
public var includeRuntime: Boolean = true
public var moduleName: String? = null
private var compileClasspath: Path? = null
@@ -38,12 +38,19 @@ public class KotlinCompilerAdapter extends Javac13 {
private static final List<String> KOTLIN_EXTENSIONS = Arrays.asList("kt", "kts");
private Path externalAnnotations;
private String moduleName;
public List<Commandline.Argument> additionalArguments = new ArrayList<Commandline.Argument>(0);
public void setExternalAnnotations(Path externalAnnotations) {
this.externalAnnotations = externalAnnotations;
}
public void setModuleName(String moduleName) {
this.moduleName = moduleName;
}
public Path createExternalAnnotations() {
if (externalAnnotations == null) {
externalAnnotations = new Path(getProject());
@@ -85,6 +92,8 @@ public class KotlinCompilerAdapter extends Javac13 {
kotlinc.setExternalAnnotations(externalAnnotations);
kotlinc.setModuleName(moduleName);
kotlinc.getAdditionalArguments().addAll(additionalArguments);
// Javac13#execute passes everything in compileList to javac, which doesn't recognize .kt files