[Gradle, JS] Configure tasks in after evaluate block
^KT-34014 fixed ^KT-49505 fixed
This commit is contained in:
+11
-1
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.gradle.targets.js.yarn
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.BasePlugin
|
||||
import org.jetbrains.kotlin.gradle.plugin.whenEvaluated
|
||||
import org.jetbrains.kotlin.gradle.targets.js.MultiplePluginDeclarationDetector
|
||||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin
|
||||
import org.jetbrains.kotlin.gradle.targets.js.npm.RequiresNpmDependencies
|
||||
@@ -66,7 +67,16 @@ open class YarnPlugin : Plugin<Project> {
|
||||
|
||||
project.allprojects
|
||||
.forEach {
|
||||
it.tasks.implementing(RequiresNpmDependencies::class).all {}
|
||||
val fn: (Project) -> Unit = {
|
||||
it.tasks.implementing(RequiresNpmDependencies::class).all {}
|
||||
}
|
||||
if (it.state.executed) {
|
||||
fn(it)
|
||||
} else {
|
||||
it.afterEvaluate {
|
||||
fn(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val storeYarnLock = tasks.register("kotlinStoreYarnLock") {
|
||||
|
||||
Reference in New Issue
Block a user