diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunner.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunner.kt index cbba33ef3c7..a4caa0d76ef 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunner.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunner.kt @@ -109,11 +109,10 @@ class IncrementalJsCompilerRunner( } override fun destinationDir(args: K2JSCompilerArguments): File { - val outputFile = File(args.outputFile!!) return if (args.isIrBackendEnabled()) - outputFile + File(args.outputDir!!) else - outputFile.parentFile + File(args.outputFile!!).parentFile } override fun calculateSourcesToCompile( diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementalJsKlibCompilerRunnerTest.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementalJsKlibCompilerRunnerTest.kt index 6b9e690cc4f..8c796770d17 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementalJsKlibCompilerRunnerTest.kt +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementalJsKlibCompilerRunnerTest.kt @@ -9,7 +9,9 @@ abstract class AbstractIncrementalJsKlibCompilerRunnerTest : AbstractIncremental override fun createCompilerArguments(destinationDir: File, testDir: File): K2JSCompilerArguments = K2JSCompilerArguments().apply { libraries = "build/js-ir-runtime/full-runtime.klib" - outputFile = File(destinationDir, "${testDir.name}.$KLIB_FILE_EXTENSION").path + outputDir = destinationDir.path + outputName = testDir.name + outputFile = null sourceMap = false irProduceKlibDir = false irProduceKlibFile = true diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementalMultiModuleJsKlibCompilerRunnerTest.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementalMultiModuleJsKlibCompilerRunnerTest.kt index 99344df951c..cd938240dbc 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementalMultiModuleJsKlibCompilerRunnerTest.kt +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementalMultiModuleJsKlibCompilerRunnerTest.kt @@ -19,7 +19,8 @@ abstract class AbstractIncrementalMultiModuleJsKlibCompilerRunnerTest : override fun createCompilerArguments(destinationDir: File, testDir: File): K2JSCompilerArguments = K2JSCompilerArguments().apply { libraries = STDLIB_DEPENDENCY - outputFile = File(destinationDir, "${testDir.name}.$KLIB_FILE_EXTENSION").path + outputDir = destinationDir.path + outputName = testDir.name sourceMap = false irProduceKlibDir = false irProduceKlibFile = true @@ -81,7 +82,8 @@ abstract class AbstractIncrementalMultiModuleJsKlibCompilerRunnerTest : } libraries = sb.toString() - outputFile = outFile.path + outputDir = outFile.parentFile.path + outputName = outFile.nameWithoutExtension } companion object { diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt index 3f0cc5ffbd6..ca41a35944c 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt @@ -106,7 +106,8 @@ abstract class AbstractJsKlibLookupTrackerTest : AbstractJsLookupTrackerTest() { override fun configureAdditionalArgs(args: K2JSCompilerArguments) { args.irProduceKlibDir = true args.irOnly = true - args.outputFile = outDir.resolve("out.klib").absolutePath + args.outputDir = outDir.normalize().absolutePath + args.outputName = "out" } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt b/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt index 11714f5bfbc..7533de3e8bd 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt @@ -299,7 +299,7 @@ class GenerateIrRuntime { val args = K2JSCompilerArguments().apply { libraries = "" - outputFile = klibDirectory.path + outputDir = klibDirectory.path sourceMap = false irProduceKlibDir = true irOnly = true diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/testOld/compatibility/binary/AbstractJsKlibBinaryCompatibilityTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/testOld/compatibility/binary/AbstractJsKlibBinaryCompatibilityTest.kt index e14bed32f05..9d7ce8e8305 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/testOld/compatibility/binary/AbstractJsKlibBinaryCompatibilityTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/testOld/compatibility/binary/AbstractJsKlibBinaryCompatibilityTest.kt @@ -53,7 +53,8 @@ abstract class AbstractJsKlibBinaryCompatibilityTest : AbstractKlibBinaryCompati val args = K2JSCompilerArguments().apply { freeArgs = createFiles(module.versionFiles(version)) libraries = module.dependenciesToLibrariesArg(version = version) - outputFile = File(workingDir, "${module.name(version)}.$KLIB_FILE_EXTENSION").absolutePath + outputDir = workingDir.normalize().absolutePath + outputName = module.name(version) irProduceKlibFile = true irOnly = true irModuleName = module.name @@ -67,7 +68,8 @@ abstract class AbstractJsKlibBinaryCompatibilityTest : AbstractKlibBinaryCompati val args = K2JSCompilerArguments().apply { freeArgs = createFiles(module.files) + runnerFunctionFile() libraries = module.dependenciesToLibrariesArg(version = 2) - outputFile = File(workingDir, module.name.js).absolutePath + outputDir = workingDir.normalize().absolutePath + outputName = module.name irProduceJs = true irOnly = true irModuleName = module.name