build: Replace Gradle APIs removed in Gradle 10 - #5864
Merged
Conversation
📲 Install BuildsAndroid
|
runningcode
marked this pull request as ready for review
July 29, 2026 13:41
runningcode
requested review from
0xadam-brown,
adinauer,
markushi and
romtsn
as code owners
July 29, 2026 13:41
Gradle 9.6 deprecated four APIs our build scripts still used, all of which either fail or are removed in Gradle 10: - Project.getProperties, replaced with providers.gradleProperty - Project objects as dependency notation, replaced with project(path) - the 'val x by creating' configuration delegate, replaced with create() - the 'val x by getting' source set delegate, replaced with getByName() The remaining Gradle 10 warnings come from Detekt and AGP internals, not from our scripts, so they can only be resolved by upgrading those. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
runningcode
force-pushed
the
no/fix-gradle-10-deprecations
branch
from
July 29, 2026 13:44
b12b569 to
44bcbcc
Compare
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.
📜 Description
This PR removes build warnings from deprecations used in our build. Behavior should be the same and we'll save our LLM tokens on every build!
Project.getProperties(fails in Gradle 10)providers.gradleProperty(...)build.gradle.kts,buildSrc/.../Publication.kt(2 sites)Projectobject as dependency notation (fails in Gradle 10)dependencies.project(path)io.sentry.javadoc.aggregate.gradle.ktsval x by creatingconfiguration delegate (removed in Gradle 10)configurations.create("...")io.sentry.javadoc.aggregate.gradle.kts,io.sentry.javadoc.gradle.ktsval x by gettingsource set delegate (removed in Gradle 10)sourceSets.getByName("...")sentry-compose/build.gradle.kts(3 sites)No behavior change — this is a mechanical API swap.
💡 Motivation and Context
Gets us ahead of Gradle 10, where these stop being warnings and start breaking the build. Doing it now keeps the eventual Gradle 10 bump small.
💚 How did you test it?
CI passes
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
rest of the warnings!