尝试升级到gradle 6,但似乎与5.0向后不兼容。某些依赖项缺少.pom和ivy.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是一样的问题
发布于 2020-01-02 01:31:17
这个问题可以通过使用插件的派生版本来解决,例如,将构建脚本从:
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'https://stackoverflow.com/questions/59545881
复制相似问题