Module name parameter added to ant tasks
This commit is contained in:
@@ -25,6 +25,7 @@ public class Kotlin2JvmTask : KotlinCompilerBaseTask() {
|
|||||||
|
|
||||||
public var externalAnnotations: Path? = null
|
public var externalAnnotations: Path? = null
|
||||||
public var includeRuntime: Boolean = true
|
public var includeRuntime: Boolean = true
|
||||||
|
public var moduleName: String? = null
|
||||||
|
|
||||||
private var compileClasspath: Path? = 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 static final List<String> KOTLIN_EXTENSIONS = Arrays.asList("kt", "kts");
|
||||||
|
|
||||||
private Path externalAnnotations;
|
private Path externalAnnotations;
|
||||||
|
|
||||||
|
private String moduleName;
|
||||||
|
|
||||||
public List<Commandline.Argument> additionalArguments = new ArrayList<Commandline.Argument>(0);
|
public List<Commandline.Argument> additionalArguments = new ArrayList<Commandline.Argument>(0);
|
||||||
|
|
||||||
public void setExternalAnnotations(Path externalAnnotations) {
|
public void setExternalAnnotations(Path externalAnnotations) {
|
||||||
this.externalAnnotations = externalAnnotations;
|
this.externalAnnotations = externalAnnotations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setModuleName(String moduleName) {
|
||||||
|
this.moduleName = moduleName;
|
||||||
|
}
|
||||||
|
|
||||||
public Path createExternalAnnotations() {
|
public Path createExternalAnnotations() {
|
||||||
if (externalAnnotations == null) {
|
if (externalAnnotations == null) {
|
||||||
externalAnnotations = new Path(getProject());
|
externalAnnotations = new Path(getProject());
|
||||||
@@ -85,6 +92,8 @@ public class KotlinCompilerAdapter extends Javac13 {
|
|||||||
|
|
||||||
kotlinc.setExternalAnnotations(externalAnnotations);
|
kotlinc.setExternalAnnotations(externalAnnotations);
|
||||||
|
|
||||||
|
kotlinc.setModuleName(moduleName);
|
||||||
|
|
||||||
kotlinc.getAdditionalArguments().addAll(additionalArguments);
|
kotlinc.getAdditionalArguments().addAll(additionalArguments);
|
||||||
|
|
||||||
// Javac13#execute passes everything in compileList to javac, which doesn't recognize .kt files
|
// Javac13#execute passes everything in compileList to javac, which doesn't recognize .kt files
|
||||||
|
|||||||
Reference in New Issue
Block a user