[Gradle, JS] Add missing dependsOn on kotlinNpmCachesSetup task
It's already was not causing the build failure because of changes related to persisted yarn.lock but this fix is more reliable. Also hidden `kotlinNpmCachesSetup` task by unsetting task group as it's not supposed to be executed directly and moreover direct execution makes no sense. #KT-47215 Fixed
This commit is contained in:
+5
-5
@@ -41,19 +41,19 @@ open class NodeJsRootPlugin : Plugin<Project> {
|
||||
|
||||
val rootClean = project.rootProject.tasks.named(BasePlugin.CLEAN_TASK_NAME)
|
||||
|
||||
val setupFileHasherTask = registerTask<KotlinNpmCachesSetup>(KotlinNpmCachesSetup.NAME) {
|
||||
it.description = "Setup file hasher for caches"
|
||||
}
|
||||
|
||||
registerTask<KotlinNpmInstallTask>(KotlinNpmInstallTask.NAME) {
|
||||
it.dependsOn(setupTask)
|
||||
it.dependsOn(setupFileHasherTask)
|
||||
it.group = TASKS_GROUP_NAME
|
||||
it.description = "Find, download and link NPM dependencies and projects"
|
||||
|
||||
it.mustRunAfter(rootClean)
|
||||
}
|
||||
|
||||
registerTask<KotlinNpmCachesSetup>(KotlinNpmCachesSetup.NAME) {
|
||||
it.group = TASKS_GROUP_NAME
|
||||
it.description = "Setup file hasher for caches"
|
||||
}
|
||||
|
||||
registerTask<Task>(PACKAGE_JSON_UMBRELLA_TASK_NAME)
|
||||
|
||||
YarnPlugin.apply(project)
|
||||
|
||||
+1
@@ -41,6 +41,7 @@ open class YarnPlugin : Plugin<Project> {
|
||||
val rootClean = project.rootProject.tasks.named(BasePlugin.CLEAN_TASK_NAME)
|
||||
|
||||
val rootPackageJson = tasks.register(RootPackageJsonTask.NAME, RootPackageJsonTask::class.java) { task ->
|
||||
task.dependsOn(nodeJs.npmCachesSetupTaskProvider)
|
||||
task.group = NodeJsRootPlugin.TASKS_GROUP_NAME
|
||||
task.description = "Create root package.json"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user