|
|
|
@ -31,9 +31,11 @@ internal fun Collection<KotlinJsIrTarget>.configureExperimentalWebApplication(
|
|
|
|
|
} |
|
|
|
|
forEach { |
|
|
|
|
val mainCompilation = it.compilations.getByName("main") |
|
|
|
|
val testCompilation = it.compilations.getByName("test") |
|
|
|
|
val unpackedRuntimeDir = project.layout.buildDirectory.dir("compose/skiko-wasm/${it.targetName}") |
|
|
|
|
val taskName = "unpackSkikoWasmRuntime${it.targetName.uppercaseFirstChar()}" |
|
|
|
|
mainCompilation.defaultSourceSet.resources.srcDir(unpackedRuntimeDir) |
|
|
|
|
testCompilation.defaultSourceSet.resources.srcDir(unpackedRuntimeDir) |
|
|
|
|
|
|
|
|
|
val unpackRuntime = project.registerTask<ExperimentalUnpackSkikoWasmRuntimeTask>(taskName) { |
|
|
|
|
skikoRuntimeFiles = skikoJsWasmRuntimeConfiguration |
|
|
|
@ -42,6 +44,9 @@ internal fun Collection<KotlinJsIrTarget>.configureExperimentalWebApplication(
|
|
|
|
|
project.tasks.named(mainCompilation.processResourcesTaskName).configure { processResourcesTask -> |
|
|
|
|
processResourcesTask.dependsOn(unpackRuntime) |
|
|
|
|
} |
|
|
|
|
project.tasks.named(testCompilation.processResourcesTaskName).configure { processResourcesTask -> |
|
|
|
|
processResourcesTask.dependsOn(unpackRuntime) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|