JS: rename "-library-files" argument to "-libraries" and change separator

Use the system separator (':' or ';') instead of commas

 #KT-16083 Fixed
This commit is contained in:
Alexander Udalov
2017-01-30 18:54:24 +03:00
parent fd24031a69
commit 464820458e
30 changed files with 68 additions and 77 deletions
@@ -325,10 +325,7 @@ open class Kotlin2JsCompile() : AbstractKotlinCompile<K2JSCompilerArguments>(),
.filter { LibraryUtils.isKotlinJavascriptLibrary(it) }
.map { it.canonicalPath }
args.libraryFiles = when (friendDependency) {
null -> dependencies.toTypedArray()
else -> (dependencies + friendDependency).toTypedArray()
}
args.libraries = (dependencies + friendDependency.orEmpty()).joinToString(File.pathSeparator)
kotlinOptionsImpl.updateArguments(args)
return args
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.maven;
import com.intellij.util.ArrayUtil;
import com.intellij.openapi.util.text.StringUtil;
import kotlin.text.StringsKt;
import org.apache.maven.artifact.DependencyResolutionRequiredException;
import org.apache.maven.plugin.MojoExecutionException;
@@ -97,8 +97,8 @@ public class K2JSCompilerMojo extends KotlinCompileMojoBase<K2JSCompilerArgument
} catch (DependencyResolutionRequiredException e) {
throw new MojoExecutionException("Unresolved dependencies", e);
}
getLog().debug("libraryFiles: " + libraries);
arguments.libraryFiles = ArrayUtil.toStringArray(libraries);
getLog().debug("libraries: " + libraries);
arguments.libraries = StringUtil.join(libraries, File.pathSeparator);
arguments.sourceMap = sourceMap;