In my plugin I need to be resolving project’s Java compile plus runtime dependencies. I used to be resolving JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME and then JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME.
Now I noticed this warning
The compileOnly configuration has been deprecated for resolution. This will fail with an error in Gradle 7.0. Please resolve the compileClasspath configuration instead. Consult the upgrading guide for further information: https://docs.gradle.org/6.5.1/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
So now I am switching from JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME to JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME. That works of course but I have to be filtering out the duplicate deps that constitute probably 99% or even 100% most of the time.
Perhaps, there is a more efficient and supported way of achieving the same result? Thanks.