Fixed empty -libraries passed from Gradle plugin in CLI.

This commit is contained in:
Sergey Igushkin
2017-02-02 21:46:03 +03:00
parent f0e3c87b84
commit 2516583ecf
@@ -334,7 +334,11 @@ open class Kotlin2JsCompile() : AbstractKotlinCompile<K2JSCompilerArguments>(),
.filter { LibraryUtils.isKotlinJavascriptLibrary(it) }
.map { it.canonicalPath }
args.libraries = (dependencies + friendDependency.orEmpty()).joinToString(File.pathSeparator)
args.libraries = (dependencies + listOfNotNull(friendDependency)).let {
if (it.isNotEmpty())
it.joinToString(File.pathSeparator) else
null
}
kotlinOptionsImpl.updateArguments(args)
return args