The project at https://github.com/gesellix/gradle-global-dependencies shows that I cannot force Gradle to use the dependency ‘org.yaml:snakeyaml:1.10’, but always gives me an older version (looks like org.yaml:snakeyaml:1.6). It looks like Gradle ignores user dependencies which are included in the Gradle distribution.
Is it possible to force Gradle to accept such user defined dependency versions?
A (relative inconvenient) workaround I can think of might be explicitly add the gradle dependencies. Depending of your plugin ,you might just need gradle-core jar.
@Rene: explicitly adding the gradle dependencies really sounds quite inconvenient, especially when it comes to gradle updates @Peter: this didn’t work for me. It seems like the gradle dependencies are loaded into the classpath at another phase, but your idea looks like it should work.
Until know I thought Gradle would also use its dependency resolution mechanism, but looking at the DependencyClassPathProvider there’s much manual classpath manipulation going on. Would it be possible for me to hook into the DependencyClassPathProvider or ModuleRegistry for skipping the PluginModules?
Do you know if Gradle will get a fix regarding the gradleApi (and localGroovy) dependency issues?
We have some plans to improve the overall experience of plugin authors and provide a better way to declare dependencies on the gradle functionality. Fixing gradleApi() behaviour is currently not on the top of our priority list though.