@@ -4,11 +4,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
44import com.google.cloud.tools.jib.gradle.JibTask
55import common.*
66import org.gradle.internal.os.OperatingSystem
7- import org.jetbrains.kotlin.gradle.targets.js.nodejs.*
8- import org.jetbrains.kotlin.gradle.targets.js.npm.*
9- import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.*
10- import org.jetbrains.kotlin.gradle.targets.wasm.nodejs.*
11- import org.jetbrains.kotlin.gradle.targets.wasm.npm.*
7+ import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask
128import tasks.*
139
1410plugins {
@@ -199,47 +195,22 @@ tasks {
199195 }
200196}
201197
202- // var npmEnabled: String? by rootProject.extra
203-
204- plugins.withType<NodeJsPlugin > {
205- the<NodeJsEnvSpec >().apply {
206- download = true
207- // version = libs.versions.nodejs.version.get()
208- // downloadBaseUrl = "https://nodejs.org/download/nightly"
209- }
210-
211- rootProject.the<NpmExtension >().apply {
212- lockFileDirectory = project.rootDir.resolve(" gradle/kotlin-js-store" )
213- }
214- }
215-
216- plugins.withType<WasmNodeJsPlugin > {
217- the<WasmNodeJsEnvSpec >().apply {
218- download = true
219- // version = libs.versions.nodejs.version.get()
220- // downloadBaseUrl = "https://nodejs.org/download/nightly"
221- }
222- rootProject.the<WasmNpmExtension >().apply {
223- lockFileDirectory = project.rootDir.resolve(" gradle/kotlin-js-store/wasm" )
224- }
225- }
226-
227198// Expose shared js/wasm resource as configuration to be consumed by other projects.
228199// https://docs.gradle.org/current/userguide/cross_project_publications.html#sec:simple-sharing-artifacts-between-projects
229200artifacts {
230201 if (isSharedProject) {
231- tasks.findByName(" jsProcessResources" )?.let {
202+ tasks.findByName(" jsProcessResources" )?.let { task ->
232203 val sharedJsResources by configurations.consumable(" sharedJsResources" )
233- add(sharedJsResources.name, provider { it })
204+ add(sharedJsResources.name, provider { task })
234205 }
235206
236- tasks.findByName(" wasmJsProcessResources" )?.let {
207+ tasks.findByName(" wasmJsProcessResources" )?.let { task ->
237208 val sharedWasmResources by configurations.consumable(" sharedWasmResources" )
238- add(sharedWasmResources.name, provider { it })
209+ add(sharedWasmResources.name, provider { task })
239210 }
240211 }
241212}
242213
243- dependencies {
244- // add("kspJvm", project(":ksp-processor"))
245- }
214+ // var npmEnabled: String? by rootProject.extra
215+ // plugins.withType<NodeJsPlugin> { the<NodeJsEnvSpec>().apply {} }
216+ // plugins.withType<WasmNodeJsPlugin> { the<WasmNodeJsEnvSpec>().apply {} }
0 commit comments