[Gradle, JS] Fix build for legacy browser with binaries
This commit is contained in:
+9
-1
@@ -61,4 +61,12 @@ class Executable(
|
||||
type,
|
||||
null
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Hack for legacy
|
||||
internal val JsBinary.executeTaskBaseName: String
|
||||
get() = generateBinaryName(
|
||||
compilation,
|
||||
type,
|
||||
null
|
||||
)
|
||||
+1
-3
@@ -16,6 +16,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJsCompilation
|
||||
import org.jetbrains.kotlin.gradle.targets.js.KotlinJsTarget
|
||||
import org.jetbrains.kotlin.gradle.targets.js.dsl.*
|
||||
import org.jetbrains.kotlin.gradle.targets.js.ir.Executable
|
||||
import org.jetbrains.kotlin.gradle.targets.js.ir.executeTaskBaseName
|
||||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin
|
||||
import org.jetbrains.kotlin.gradle.targets.js.npm.npmProject
|
||||
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
|
||||
@@ -173,10 +174,7 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
||||
assembleTask.dependsOn(distributeResourcesTask)
|
||||
|
||||
compilation.binaries
|
||||
.matching { it is Executable }
|
||||
.all { binary ->
|
||||
binary as Executable
|
||||
|
||||
val type = binary.type
|
||||
|
||||
val webpackTask = project.registerTask<KotlinWebpack>(
|
||||
|
||||
Reference in New Issue
Block a user