-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Fix deprecated Gradle plugin usages for Gradle 9.0 upgrade #18472
Description
Running the build with Gradle 8.x emits deprecation warnings for features scheduled for removal in Gradle 9.0. These warnings primarily originate from the io-github-gradle-nexus-publish-plugin, org-jfrog-buildinfo-build-info-extractor-gradle plugins and internal convention plugins (SchemaZipPlugin, JavadocApiPlugin, IntegrationTestPlugin, DocsPlugin).
- io.github.gradle-nexus:publish-plugin Plugin The io.github.gradle-nexus:publish-plugin (currently version 1.3.0) triggers a deprecation warning regarding org.gradle.api.plugins.Convention.
at spring_security_access_6te1i8djhga35cb865d0zukyu.run(...\spring-security\access\spring-security-access.gradle:1)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Fix: Update plugin version in libs.versions.toml
io-github-gradle-nexus-publish-plugin = "io.github.gradle-nexus:publish-plugin:2.0.0"
- io.github.gradle-nexus:publish-plugin Plugin The io.github.gradle-nexus:publish-plugin (currently version 4.34.2) triggers a deprecation warning regarding org.gradle.api.plugins.Convention.
The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#deprecated_access_to_conventions
at build_61nyef417be5wuvtdx1369msd.run(...\spring-security\build.gradle:23)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The org.gradle.util.ConfigureUtil type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#org_gradle_util_reports_deprecations
at build_61nyef417be5wuvtdx1369msd.run(...\spring-security\build.gradle:23)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Fix: Update plugin version in libs.versions.toml
org-jfrog-buildinfo-build-info-extractor-gradle = "org.jfrog.buildinfo:build-info-extractor-gradle:6.0.4"
- Groovy DSL Assignment Syntax: Space-separated property assignment (e.g., url "...") is deprecated.
Settings file '...\spring-security\settings.gradle': line 14
Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0. Use assignment ('url = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
at settings_6zj1barhyzqclq7vxp9qyg292$_run_closure1$_closure4$_closure5.doCall$original(...\spring-security\settings.gradle:14)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
at settings_6zj1barhyzqclq7vxp9qyg292$_run_closure1$_closure4.doCall$original(...\spring-security\settings.gradle:14)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Fix: Update [settings.gradle] to use assignment syntax (url = "...").
- IdeaModule.testSourceDirs Deprecation The IntegrationTestPlugin (located in buildSrc) uses the deprecated testSourceDirs property from the Gradle idea plugin. This property is scheduled for removal in Gradle 9.0.
The IdeaModule.testSourceDirs property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the testSources property instead. For more information, please refer to https://docs.gradle.org/8.14/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html#org.gradle.plugins.ide.idea.model.IdeaModule:testSourceDirs in the Gradle documentation.
at spring_security_config_5q2kwey1zh818c3dd0r6qjjlj.run(...\spring-security\config\spring-security-config.gradle:4)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Fix: Update the plugin to use testSources.from(...) instead of appending to testSourceDirs.
- DocsPlugin: Uses deprecated space-separated property assignment for duplicatesStrategy and description.
Fix: Update property assignments to use the assignment syntax (prop = value).
- SchemaZipPlugin: Uses deprecated space-separated property assignment for duplicatesStrategy.
Fix: Update property assignments to use the assignment syntax (prop = value).
- JavadocApiPlugin:Uses org.gradle.api.plugins.JavaPluginConvention which is deprecated.Uses project.getBuildDir() which is deprecated.
Fix: Migrate JavaPluginConvention usage to JavaPluginExtension and migrate project.getBuildDir() usage to project.layout.buildDirectory.