[Gradle, JS] Fix for output file
This commit is contained in:
+1
-1
@@ -530,7 +530,7 @@ abstract class AbstractKotlin2JsGradlePluginIT(protected val irBackend: Boolean)
|
||||
":compileTestKotlin2Js"
|
||||
)
|
||||
if (irBackend) {
|
||||
assertFileInProjectExists("build/kotlin2js/main/module.js/default/manifest")
|
||||
assertFileInProjectExists("build/kotlin2js/main/default/manifest")
|
||||
} else {
|
||||
assertFileInProjectExists("build/kotlin2js/main/module.js")
|
||||
}
|
||||
|
||||
+3
-1
@@ -28,10 +28,12 @@ artifacts {
|
||||
implementation jarSources
|
||||
}
|
||||
|
||||
compileKotlin2Js.kotlinOptions.outputFile = "${buildDir}/kotlin2js/main/module.js"
|
||||
compileTestKotlin2Js.kotlinOptions.outputFile = "${buildDir}/kotlin2js/test/module-tests.js"
|
||||
|
||||
if (project.findProperty("kotlin.js.useIrBackend")?.toBoolean() == true) {
|
||||
compileKotlin2Js.kotlinOptions.freeCompilerArgs += ["-Xir-produce-klib-dir", "-Xir-only"]
|
||||
compileTestKotlin2Js.kotlinOptions.freeCompilerArgs += ["-Xir-produce-js"]
|
||||
compileKotlin2Js.kotlinOptions.outputFile = "${buildDir}/kotlin2js/main/"
|
||||
} else {
|
||||
compileKotlin2Js.kotlinOptions.outputFile = "${buildDir}/kotlin2js/main/module.js"
|
||||
}
|
||||
+2
-1
@@ -57,7 +57,8 @@ internal open class BaseKotlin2JsCompileConfig<TASK : Kotlin2JsCompile>(
|
||||
val freeArgs = task.enhancedFreeCompilerArgs.get()
|
||||
if (task.compilerOptions.outputFile.orNull != null) {
|
||||
if (freeArgs.contains(PRODUCE_UNZIPPED_KLIB)) {
|
||||
File(task.compilerOptions.outputFile.get())
|
||||
val file = File(task.compilerOptions.outputFile.get())
|
||||
if (file.extension == "") file else file.parentFile
|
||||
} else {
|
||||
File(task.compilerOptions.outputFile.get()).parentFile
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user