dependency-check-gradle icon indicating copy to clipboard operation
dependency-check-gradle copied to clipboard

Compatibility with gradle 7

Open occhioni-esteco opened this issue 3 years ago • 2 comments

Hi, seems that the plugin is not Gradle 7 compliant.

When running task (dependencyCheck or dependencyCheckAggregate) from dependency-check plugin with the option --warning-mode all what i get is the following error list:

The archives configuration has been deprecated for resolution. This will fail with an error in Gradle 7.0. Please resolve the compileClasspath or runtimeClasspath configuration instead. Consult the upgrading guide for further information: https://docs.gradle.org/6.8.3/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations The default configuration has been deprecated for resolution. This will fail with an error in Gradle 7.0. Please resolve the compileClasspath or runtimeClasspath configuration instead. Consult the upgrading guide for further information: https://docs.gradle.org/6.8.3/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations The compile 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.8.3/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations 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.8.3/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations 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: https://docs.gradle.org/6.8.3/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations

occhioni-esteco avatar Sep 30 '21 06:09 occhioni-esteco

The plugin is compatible - ODC is just pulling in the scopes within the build. When you use gradle 7+ the scopes it is complaining about won't be present so ODC will not attempt to pull them in.

jeremylong avatar Sep 30 '21 12:09 jeremylong

I can confirm that with gradle 7.4 it still works for me.

Simulant87 avatar Mar 09 '22 15:03 Simulant87

I'd like to suggest to close this issue. As Jeremy explained the warnings produced by Gradle 6 can be ignored. And I can confirm that the ODC Gradle Plugin runs without any complications on all of the most recent Gradle major versions (6.9.4, 7.6.1, 8.1.1).

cstsw avatar Jun 21 '23 11:06 cstsw