generate kjsm-files for js-stdlib and during compilation via maven or gradle
This commit is contained in:
+3
@@ -249,6 +249,8 @@ public open class Kotlin2JsCompile() : AbstractKotlinCompile<K2JSCompilerArgumen
|
||||
override fun createBlankArgs(): K2JSCompilerArguments {
|
||||
val args = K2JSCompilerArguments()
|
||||
args.libraryFiles = arrayOf<String>() // defaults to null
|
||||
args.metaInfo = true
|
||||
args.kjsm = true
|
||||
return args
|
||||
}
|
||||
|
||||
@@ -280,6 +282,7 @@ public open class Kotlin2JsCompile() : AbstractKotlinCompile<K2JSCompilerArgumen
|
||||
args.outputPrefix = kotlinOptions.outputPrefix
|
||||
args.outputPostfix = kotlinOptions.outputPostfix
|
||||
args.metaInfo = kotlinOptions.metaInfo
|
||||
args.kjsm = kotlinOptions.kjsm
|
||||
|
||||
val kotlinJsLibsFromDependencies =
|
||||
getProject().getConfigurations().getByName("compile")
|
||||
|
||||
+7
@@ -62,6 +62,12 @@ public class K2JSCompilerMojo extends KotlinCompileMojoBase<K2JSCompilerArgument
|
||||
@Parameter(defaultValue = "true")
|
||||
private boolean metaInfo;
|
||||
|
||||
/**
|
||||
* Flag enables or disables kjsm generation
|
||||
*/
|
||||
@Parameter(defaultValue = "true")
|
||||
private boolean kjsm;
|
||||
|
||||
/**
|
||||
* Flags enables or disable source map generation
|
||||
*/
|
||||
@@ -73,6 +79,7 @@ public class K2JSCompilerMojo extends KotlinCompileMojoBase<K2JSCompilerArgument
|
||||
arguments.outputFile = outputFile;
|
||||
arguments.noStdlib = true;
|
||||
arguments.metaInfo = metaInfo;
|
||||
arguments.kjsm = kjsm;
|
||||
|
||||
List<String> libraries = getKotlinJavascriptLibraryFiles();
|
||||
getLog().debug("libraryFiles: " + libraries);
|
||||
|
||||
Reference in New Issue
Block a user