JS: fix building stubs for JS library that contains classes in default package
This commit is contained in:
@@ -420,15 +420,6 @@
|
|||||||
</src>
|
</src>
|
||||||
</new-kotlin2js>
|
</new-kotlin2js>
|
||||||
|
|
||||||
<!-- TODO: it's a temporary hack, until IDEA indexer learns how to process this correctly -->
|
|
||||||
<delete file="${js.stdlib.output.dir}/tmp/kotlin/BaseOutput.kjsm"/>
|
|
||||||
<delete file="${js.stdlib.output.dir}/tmp/kotlin/BufferedOutput.kjsm"/>
|
|
||||||
<delete file="${js.stdlib.output.dir}/tmp/kotlin/BufferedOutputToConsoleLog.kjsm"/>
|
|
||||||
<delete file="${js.stdlib.output.dir}/tmp/kotlin/NodeJsOutput.kjsm"/>
|
|
||||||
<delete file="${js.stdlib.output.dir}/tmp/kotlin/OutputToConsoleLog.kjsm"/>
|
|
||||||
<delete file="${js.stdlib.output.dir}/tmp/kotlin/PropertyMetadata.kjsm"/>
|
|
||||||
<!-- -->
|
|
||||||
|
|
||||||
<move file="${js.stdlib.output.dir}/tmp-builtins/kotlin.js" tofile="${js.stdlib.output.dir}/builtins.js" />
|
<move file="${js.stdlib.output.dir}/tmp-builtins/kotlin.js" tofile="${js.stdlib.output.dir}/builtins.js" />
|
||||||
<move file="${js.stdlib.output.dir}/tmp/kotlin.js" tofile="${js.stdlib.output.dir}/${compiled.stdlib.js}" />
|
<move file="${js.stdlib.output.dir}/tmp/kotlin.js" tofile="${js.stdlib.output.dir}/${compiled.stdlib.js}" />
|
||||||
<move file="${js.stdlib.output.dir}/tmp/kotlin" todir="${js.stdlib.output.dir}" />
|
<move file="${js.stdlib.output.dir}/tmp/kotlin" todir="${js.stdlib.output.dir}" />
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ object JsMetaFileUtils {
|
|||||||
|
|
||||||
private fun getPackageFqName(relPath: String): FqName {
|
private fun getPackageFqName(relPath: String): FqName {
|
||||||
val pathToFile = relPath.substringAfter(VfsUtilCore.VFS_SEPARATOR_CHAR)
|
val pathToFile = relPath.substringAfter(VfsUtilCore.VFS_SEPARATOR_CHAR)
|
||||||
if (isDefaultPackageMetafile(pathToFile)) return FqName.ROOT
|
if (isDefaultPackageMetafile(pathToFile) || !pathToFile.contains(VfsUtilCore.VFS_SEPARATOR_CHAR)) return FqName.ROOT
|
||||||
|
|
||||||
val name = pathToFile.substringBeforeLast(VfsUtilCore.VFS_SEPARATOR_CHAR)
|
val name = pathToFile.substringBeforeLast(VfsUtilCore.VFS_SEPARATOR_CHAR)
|
||||||
return FqName(name.replace(VfsUtilCore.VFS_SEPARATOR_CHAR, '.'))
|
return FqName(name.replace(VfsUtilCore.VFS_SEPARATOR_CHAR, '.'))
|
||||||
|
|||||||
Reference in New Issue
Block a user