Buildscript dependencies

I have a buildscript which includes a custom plugin as a dependency in the script. The dependecy declaration uses “classpath” to resolve the plugin (i.e
dependencies {
classpath “package:myPlugin:version”
When I apply the plugin to a project I get the following deprecation warning:
The runtime configuration has been deprecated for resolution. This will fail with an error in Gradle 7.0. Please resolve the runtimeClasspath configuration instead. Consult the upgrading guide for further information:

I’ve tried using implementation instead of classpath. How can I resolve this warning message?

Using the classpath configuration for the buildscript dependency is correct. The deprecation notice is likely from something that the custom plugin is configuring when applied, not the code in your project where you apply the plugin. You will likely need to make a change in the custom plugin itself.

Thanks James. I tracked down what I think was one of my problems: IN the plugin I was adding my configuration to the configurations.compile conf. I changed this to implementation. However, that didn’t solve my problem. I also bundle my dependencies (I’m building a Nifi nar archive). In my bundle I’m adding the project.configurations.runtime config. I’m not sure if this is a likely cause but am seeking your opinion.



That sounds like the likely cause. Any usage of the compile or runtime configuration is going to trigger the warning.

You shouldn’t need to guess though. Adding the --warning-mode all --stacktrace arguments when you run your build should give you a complete stacktrace to the offending lines.

Thanks for the suggestion. I’ll add the flags and see if I can track down the root cause.

It took awhile, but I was able to successfully fix the issue. Thanks again for the help!