[JS] Removing usage of legacy JS compiler #1
This commit is contained in:
committed by
Space Team
parent
662bff7351
commit
093f51c89a
@@ -145,17 +145,6 @@ object MockLibraryUtil {
|
||||
return createJarFile(contentDir, classesDir, jarName, sourcesPath.takeIf { addSources })
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun compileJsLibraryToJar(sourcesPath: String, jarName: String, addSources: Boolean, extraOptions: List<String> = emptyList()): File {
|
||||
val contentDir = KtTestUtil.tmpDirForReusableFolder("testLibrary-$jarName")
|
||||
|
||||
val outDir = File(contentDir, "out")
|
||||
val outputFile = File(outDir, "$jarName.js")
|
||||
compileKotlin2JS(sourcesPath, outputFile, extraOptions)
|
||||
|
||||
return createJarFile(contentDir, outDir, jarName, sourcesPath.takeIf { addSources })
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun createJarFile(contentDir: File, dirToAdd: File, jarName: String, sourcesPath: String? = null): File {
|
||||
val jarFile = File(contentDir, "$jarName.jar")
|
||||
@@ -214,10 +203,6 @@ object MockLibraryUtil {
|
||||
runJvmCompiler(args)
|
||||
}
|
||||
|
||||
private fun compileKotlin2JS(sourcesPath: String, outputFile: File, extraOptions: List<String>) {
|
||||
runJsCompiler(listOf("-meta-info", "-output", outputFile.absolutePath, sourcesPath, *extraOptions.toTypedArray()))
|
||||
}
|
||||
|
||||
fun compileKotlinModule(buildFilePath: String) {
|
||||
runJvmCompiler(listOf("-no-stdlib", "-Xbuild-file", buildFilePath))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user