[Gradle, JS] Migrate kotlin-stdlib-js
This commit is contained in:
+5
-2
@@ -65,11 +65,14 @@ class JsIrAnalysisHandlerExtensionTest : TestCaseWithTmpdir() {
|
|||||||
writeText(src.content)
|
writeText(src.content)
|
||||||
}
|
}
|
||||||
val plugin = writePlugin()
|
val plugin = writePlugin()
|
||||||
|
val outputFile = File(outFile)
|
||||||
val args = listOf(
|
val args = listOf(
|
||||||
"-Xplugin=$plugin",
|
"-Xplugin=$plugin",
|
||||||
"-libraries", libs,
|
"-libraries", libs,
|
||||||
"-output", outFile,
|
"-Xir-output-dir", outputFile.parentFile.path,
|
||||||
mainKt.absolutePath)
|
"-Xir-output-name", outputFile.nameWithoutExtension,
|
||||||
|
mainKt.absolutePath
|
||||||
|
)
|
||||||
CompilerTestUtil.executeCompilerAssertSuccessful(compiler, args + extras)
|
CompilerTestUtil.executeCompilerAssertSuccessful(compiler, args + extras)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -173,20 +173,20 @@ task compileJs(type: NoDebugJavaExec) {
|
|||||||
def rootDir = rootDir
|
def rootDir = rootDir
|
||||||
def projectDir = projectDir
|
def projectDir = projectDir
|
||||||
|
|
||||||
def compileBuiltinsKotlin2JsFiles = compileBuiltinsKotlin2Js.outputs.files
|
def compileBuiltinsKotlin2JsFiles = compileBuiltinsKotlin2Js.destinationDirectory
|
||||||
def compileKotlin2JsFiles = compileKotlin2Js.outputs.files
|
def compileKotlin2JsFiles = compileKotlin2Js.destinationDirectory
|
||||||
doFirst {
|
doFirst {
|
||||||
args = [jsOutputFileName, rootDir, "$jsSrcDir/wrapper.js"] + inputFiles.collect { it.path }.sort() +
|
args = [jsOutputFileName, rootDir, "$jsSrcDir/wrapper.js"] + inputFiles.collect { it.path }.sort() +
|
||||||
(compileBuiltinsKotlin2JsFiles.collect { it.path }.sort() +
|
(compileBuiltinsKotlin2JsFiles.asFile.get().listFiles().sort() +
|
||||||
compileKotlin2JsFiles.collect { it.path }.sort()).findAll {
|
compileKotlin2JsFiles.asFile.get().listFiles().sort()).findAll {
|
||||||
it.endsWith(".js") && !it.endsWith(".meta.js")
|
it.name.endsWith(".js") && !it.name.endsWith(".meta.js")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
classpath = configurations.kotlinCompilerClasspath
|
classpath = configurations.kotlinCompilerClasspath
|
||||||
|
|
||||||
def sourceMapFile = file(jsOutputMapFileName)
|
def sourceMapFile = file(jsOutputMapFileName)
|
||||||
def jsOutputMetaFile = file(jsOutputMetaFileName)
|
def jsOutputMetaFile = file(jsOutputMetaFileName)
|
||||||
def compileMetaFile = file(compileKotlin2Js.outputFile.path.replaceAll('\\.js$', '.meta.js'))
|
def compileMetaFile = file(compileKotlin2Js.outputFileProperty.map { it.path.replaceAll('\\.js$', '.meta.js') })
|
||||||
def mainJsOutputDir = compileKotlin2Js.destinationDirectory
|
def mainJsOutputDir = compileKotlin2Js.destinationDirectory
|
||||||
doLast {
|
doLast {
|
||||||
ant.replaceregexp(
|
ant.replaceregexp(
|
||||||
|
|||||||
Reference in New Issue
Block a user