Replace Gradle APIs deprecated for removal in Gradle 10 - #16075
Merged
jdaugherty merged 1 commit intoAug 3, 2026
Conversation
Applying the Grails Gradle plugins under Gradle 9.x emits deprecation
warnings for three APIs scheduled for removal in Gradle 10:
- Project.getProperties(): replaced project.properties lookups with
project.findProperty(name) in GrailsGradlePlugin (excludeDependencies,
configureProfile, createBuildPropertiesTask, configureGroovy)
- Project.container(Class, Closure): replaced with
objects.domainObjectContainer(Class, NamedDomainObjectFactory) in
TestPhasesGradlePlugin
- DomainObjectCollection.findAll(Closure): replaced the
findAll { } as boolean existence check with any { } in
GrailsGradlePlugin.configureMicronaut
✅ All tests passed ✅Test SummaryCI - Groovy Joint Validation Build / build_grails > :grails-data-hibernate7-core:test
CI - Groovy Joint Validation Build / build_grails > :grails-data-hibernate7-dbmigration:test
CI - Groovy Joint Validation Build / build_grails > :grails-data-mongodb-core:test (first 40 of 188)
CI - Groovy Joint Validation Build / build_grails > :grails-data-mongodb-spring-boot:test
CI - Groovy Joint Validation Build / build_grails > :grails-data-mongodb-spring-data:test
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-app1:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-app2:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-app3:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-cache:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-datasources:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-exploded:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-geb-context-path:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-geb-gebconfig:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-geb:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-gorm:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-gsp-layout:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-gsp-sitemesh3:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-hibernate5-grails-hibernate:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-hibernate7-app1:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-hibernate7-datasources:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-hibernate7-gorm:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-hibernate7-grails-hibernate:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-hibernate7-scaffolding-fields:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-hyphenated:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-jetty:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-mail:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-mongodb-base:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-mongodb-base:test
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-mongodb-hibernate5:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-mongodb-hibernate5:test
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-mongodb-test-data-service:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-namespaces:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-scaffolding-fields:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-scaffolding:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-spring-security-acl-functional-test-app:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-spring-security-core-misc-functional-test-app-group:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-spring-security-core-misc-functional-test-app-roles:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-spring-security-ldap-custom-user-details-context-mapper:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-spring-security-ldap-functional-test-app:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-spring-security-ldap-retrieve-db-roles:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-spring-security-ldap-retrieve-group-roles:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-spring-security-ui-extended:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-spring-security-ui-simple:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-test-phases:functionalTest
CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-undertow:integrationTest
CI - Groovy Joint Validation Build / build_grails > :grails-testing-support-dbcleanup-postgresql:test
🏷️ Commit: 308857c Learn more about TestLens at testlens.app. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 8.0.x #16075 +/- ##
================================================
+ Coverage 0 51.8790% +51.8790%
- Complexity 0 18118 +18118
================================================
Files 0 2046 +2046
Lines 0 96274 +96274
Branches 0 16727 +16727
================================================
+ Hits 0 49946 +49946
- Misses 0 38957 +38957
- Partials 0 7371 +7371
🚀 New features to boost your workflow:
|
codeconsole
requested review from
jdaugherty,
matrei and
sbglasius
and removed request for
matrei
July 31, 2026 21:16
sbglasius
approved these changes
Aug 1, 2026
jdaugherty
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Applying the Grails Gradle plugins under Gradle 9.x emits deprecation warnings for three APIs scheduled for removal in Gradle 10, so every consuming build prints "Deprecated Gradle features were used in this build, making it incompatible with Gradle 10." even when the app's own build scripts are fully migrated.
Observed from a Grails 8.0.0-M4 app on Gradle 9.6.1 with
--warning-mode all -Dorg.gradle.deprecation.trace=true; the traces point at:The Project.getProperties method has been deprecated.—project.properties['…']lookups inGrailsGradlePlugin(excludeDependencies,configureProfile,createBuildPropertiesTask,configureGroovy)The Project.container(Class, Closure) method has been deprecated.—TestPhasesGradlePlugin.applyThe DomainObjectCollection.findAll(Closure) method has been deprecated.—GrailsGradlePlugin.configureMicronautFix
Like-for-like replacements with the documented substitutes:
project.properties['name']→project.findProperty('name')— same resolution chain (project object property → extra properties → gradle properties), no behavior change.project.container(TestPhase) { … }→project.objects.domainObjectContainer(TestPhase) { … }— the replacement named by the deprecation message. The class is@CompileStatic, so the closure statically coerces toNamedDomainObjectFactory<TestPhase>.getAllDependencies().findAll { … } as boolean→getAllDependencies().any { … }— the call was only an existence check, andanyis a plain GroovyIterablemethod rather than the deprecated live-collection API.Verified with
:grails-gradle-plugins:compileGroovyand the module test suite.