将 gradle 升级到 6.0 需要 ivy.xml 和 pom 文件

Upgrading gradle to 6.0 requires ivy.xml and pom files

正在尝试升级到 gradle 6,但它似乎与 5.0 向后不兼容。某些依赖项缺少 .pomivy.xml 文件。例如,我们正在为我们的旧版应用程序之一使用 gulp 插件,升级到 6.0 失败并出现以下错误:

2019-12-31T13:04:34.590+0100 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
2019-12-31T13:04:34.590+0100 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker Thread 2: released lock on root.1
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':foo:nodeSetup'.
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve all files for configuration ':foo:detachedConfiguration1'.
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]    > Could not find org.nodejs:node:7.5.0.
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]      Searched in the following locations:
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]        - https://nodejs.org/dist/v7.5.0/ivy.xml
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]      Required by:
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]          project :foo
2019-12-31T13:04:34.591+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2019-12-31T13:04:34.592+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
2019-12-31T13:04:34.592+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.  Run with --scan to get full insights.
2019-12-31T13:04:34.592+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2019-12-31T13:04:34.592+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
2019-12-31T13:04:34.592+0100 [WARN] [org.gradle.internal.featurelifecycle.LoggingDeprecatedFeatureHandler] 
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.

更新

看起来和 https://github.com/srs/gradle-node-plugin/issues/351

是同一个问题

问题已通过使用插件的分叉版本解决,即将构建脚本更改为:

plugins {
   id 'com.moowork.gulp' version '1.2.0'
}

apply plugin: 'com.moowork.gulp'

收件人:

plugins {
   id "com.github.node-gradle.gulp" version "1.3.0"
}

apply plugin: 'com.github.node-gradle.gulp'