K2JS: introduce "no-stdlb" parameter and use stdlib from compiler by default.
This commit is contained in:
@@ -18,12 +18,8 @@ package org.jetbrains.jet.buildtools.ant
|
||||
|
||||
import org.apache.tools.ant.types.Path
|
||||
import org.jetbrains.jet.cli.common.arguments.K2JSCompilerArguments
|
||||
import org.jetbrains.jet.cli.common.messages.MessageCollectorPlainTextToStream
|
||||
import org.jetbrains.jet.cli.js.K2JSCompiler
|
||||
import java.io.File
|
||||
import org.apache.tools.ant.BuildException
|
||||
import org.jetbrains.jet.cli.common.ExitCode
|
||||
import org.jetbrains.jet.config.Services
|
||||
|
||||
/**
|
||||
* Kotlin JavaScript compiler Ant task.
|
||||
@@ -58,6 +54,13 @@ public class Kotlin2JsTask : KotlinCompilerBaseTask<K2JSCompilerArguments>() {
|
||||
override fun fillSpecificArguments() {
|
||||
arguments.outputFile = getPath(output!!)
|
||||
|
||||
arguments.noStdlib = noStdlib
|
||||
|
||||
// TODO: write test
|
||||
library?.let {
|
||||
arguments.libraryFiles = it.list().map { getPath(File(it)) }.copyToArray()
|
||||
}
|
||||
|
||||
arguments.outputPrefix = outputPrefix?.canonicalPath
|
||||
arguments.outputPostfix = outputPostfix?.canonicalPath
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ public class Kotlin2JvmTask : KotlinCompilerBaseTask<K2JVMCompilerArguments>()
|
||||
override val arguments = K2JVMCompilerArguments()
|
||||
override val compiler = K2JVMCompiler()
|
||||
|
||||
public var noStdlib: Boolean = false
|
||||
public var externalAnnotations: Path? = null
|
||||
public var includeRuntime: Boolean = true
|
||||
|
||||
|
||||
@@ -61,6 +61,8 @@ public abstract class KotlinCompilerBaseTask<T : CommonCompilerArguments> : Task
|
||||
public var verbose: Boolean = false
|
||||
public var printVersion: Boolean = false
|
||||
|
||||
public var noStdlib: Boolean = false
|
||||
|
||||
public val additionalArguments: MutableList<Commandline.Argument> = arrayListOf()
|
||||
|
||||
public fun createSrc(): Path {
|
||||
|
||||
Reference in New Issue
Block a user