File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
plugin/main/src/kotlinx/benchmark/gradle Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -45,16 +45,14 @@ fun Project.createJsEngineBenchmarkExecTask(
45
45
}
46
46
47
47
private fun Project.getExecutableFile (compilation : KotlinJsIrCompilation ): Provider <RegularFile > {
48
- val executableFile = when (val kotlinTarget = compilation.target) {
49
- is KotlinJsIrTarget -> {
50
- val binary = kotlinTarget.binaries.executable(compilation)
51
- .first { it.mode == KotlinJsBinaryMode .PRODUCTION } as JsIrBinary
52
- val outputFile = binary.linkTask.flatMap { it.outputFileProperty }
53
- val destinationDir = binary.linkSyncTask.map { it.destinationDir }
54
- destinationDir.zip(outputFile) { dir, file -> dir.resolve(file.name) }
55
- }
56
- else -> compilation.compileKotlinTaskProvider.flatMap { it.outputFileProperty }
48
+ val kotlinTarget = compilation.target as KotlinJsIrTarget
49
+ val binary = kotlinTarget.binaries.executable(compilation)
50
+ .first { it.mode == KotlinJsBinaryMode .PRODUCTION } as JsIrBinary
51
+ val outputFileName = binary.linkTask.flatMap { task ->
52
+ task.compilerOptions.moduleName.map { " $it .js" }
57
53
}
54
+ val destinationDir = binary.linkSyncTask.map { it.destinationDir }
55
+ val executableFile = destinationDir.zip(outputFileName) { dir, fileName -> dir.resolve(fileName) }
58
56
return project.layout.file(executableFile)
59
57
}
60
58
You can’t perform that action at this time.
0 commit comments