ben-manes / gradle-versions-plugin

Gradle plugin to discover dependency updates
Apache License 2.0
3.83k stars 200 forks source link

Gradle 9 deprecation warnings #872

Closed sdavids closed 2 weeks ago

sdavids commented 2 weeks ago
- Plugin class 'org.gradle.api.plugins.JavaBasePlugin': execution of task ':dependencyUpdates' caused invocation of 'Task.project' in other task at execution time which is unsupported.
  See https://docs.gradle.org/8.8/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:dependencyUpdates` of type `com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask`: cannot serialize a lambda that captures or accepts a parameter of type 'org.gradle.api.artifacts.Configuration' as these are not supported with the configuration cache.
  See https://docs.gradle.org/8.8/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
- Task `:dependencyUpdates` of type `com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask`: execution of task ':dependencyUpdates' caused invocation of 'Task.convention' in other task at execution time which is unsupported.
  See https://docs.gradle.org/8.8/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:dependencyUpdates` of type `com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask`: execution of task ':dependencyUpdates' caused invocation of 'Task.project' in other task at execution time which is unsupported.
  See https://docs.gradle.org/8.8/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:dependencyUpdates` of type `com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/8.8/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
ben-manes commented 2 weeks ago

The task is marked as incompatible with the configuration cache so non-issues, just unfortunately noisy for no good reason. Since checking for updates is not done on every build, being incompatible does not have much impact.

Project isolation is an experimental feature last I looked. It would require a major rework to support and many builds are incompatible anyway. That helps for performance in very large repositories and is out-of-scope as a non-issue given the frequency of the task execution.

So far it doesn’t appear that they plan to force a breakage, only opt out of performance options when this task is run. That’s perfectly fair and not a concern.

sdavids commented 2 weeks ago

https://blog.gradle.org/road-to-gradle-9#configuration-cache-improvements

In Gradle 9.0, the Configuration Cache will be the preferred mode of execution, and turning it off will be deprecated.

ben-manes commented 2 weeks ago

It’s not turned off, just discarded when a task is run that is incompatible.

https://docs.gradle.org/current/kotlin-dsl/gradle/org.gradle.api/-task/not-compatible-with-configuration-cache.html