Converting from Gradle 3.1 to 6.1.1, a copy-paste of the com.moowork.gulp plugin DSL format is failing for me. Isn’t the 6.1.1 format the following plugins:
plugins {
id "com.moowork.gulp" version "1.3.0"
}
task example {
println 'Configuration stage'
doLast {
println 'Execution stage'
}
}
The simple build.gradle file yields the following:
$ ./gradlew example
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'example'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find com.moowork.gradle:gradle-node-plugin:1.3.0.
Searched in the following locations:
- https://plugins.gradle.org/m2/com/moowork/gradle/gradle-node-plugin/1.3.0/gradle-node-plugin-1.3.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.moowork.gulp:com.moowork.gulp.gradle.plugin:1.3.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
It looks like the POM of gradle-node-plugin:1.3.0 is broken. It was probably working before because before 6, Gradle was also trying to resolve JARs without POMs by default. That’s what this info is about:
If the artifact you are trying to retrieve can be found in the repository but without metadata in ‘Maven POM’ format, …
It looks like this was fixed in gradle-node-plugin-1.3.1. Easiest fix would probably to add that plugin as well - id "com.moowork.gulp" version "1.3.1" - to force an upgrade.
Maybe you can also report this to com.moowork.gulp plugin maintainers.
$ ./gradlew example
FAILURE: Build failed with an exception.
* Where:
Build file '/home/mapr/workarea/example/build.gradle' line: 2
* What went wrong:
Plugin [id: 'com.moowork.gulp', version: '1.3.1'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.moowork.gulp:com.moowork.gulp.gradle.plugin:1.3.1')
Searched in the following repositories:
Gradle Central Plugin Repository
* Try:
Run with **--stacktrace** option to get the stack trace. Run with **--info** or **--debug** option to get more log output. Run with **--scan** to get full insights.
* Get more help at **https://help.gradle.org**
**BUILD FAILED** in 1s
For fun, I substituted the plugin with another plugin.
plugins {
id "nebula.os-package" version "2.2.6"
}
That failed too. Do the plugins no longer work for 6.1.1?
What I meant to say is that the gulp plugin transitively applies the node plugin. The latter should be upgraded to version 1.3.1. This works:
plugins {
id "com.moowork.gulp" version "1.3.0"
id "com.moowork.node" version "1.3.1"
}
task example {
println 'Configuration stage'
doLast {
println 'Execution stage'
}
}