Skip to content

build: Replace Gradle APIs removed in Gradle 10 - #5864

Merged
runningcode merged 1 commit into
mainfrom
no/fix-gradle-10-deprecations
Jul 29, 2026
Merged

build: Replace Gradle APIs removed in Gradle 10#5864
runningcode merged 1 commit into
mainfrom
no/fix-gradle-10-deprecations

Conversation

@runningcode

@runningcode runningcode commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📜 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!

Deprecated API Replacement Files
Project.getProperties (fails in Gradle 10) providers.gradleProperty(...) build.gradle.kts, buildSrc/.../Publication.kt (2 sites)
Project object as dependency notation (fails in Gradle 10) dependencies.project(path) io.sentry.javadoc.aggregate.gradle.kts
val x by creating configuration delegate (removed in Gradle 10) configurations.create("...") io.sentry.javadoc.aggregate.gradle.kts, io.sentry.javadoc.gradle.kts
val x by getting source 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

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

rest of the warnings!

@linear-code

linear-code Bot commented Jul 29, 2026

Copy link
Copy Markdown

GRADLE-10

@sentry

sentry Bot commented Jul 29, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.50.0 (1) release

⚙️ sentry-android Build Distribution Settings

Base automatically changed from no/upgrade-gradle-9.6.1 to main July 29, 2026 12:56
@runningcode
runningcode marked this pull request as ready for review 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
runningcode force-pushed the no/fix-gradle-10-deprecations branch from b12b569 to 44bcbcc Compare July 29, 2026 13:44
@runningcode runningcode added the ship-it PR is ready to merge from a reviewer perspective label Jul 29, 2026

@0xadam-brown 0xadam-brown left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💰 💯

@runningcode
runningcode merged commit 80c3e67 into main Jul 29, 2026
70 checks passed
@runningcode
runningcode deleted the no/fix-gradle-10-deprecations branch July 29, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ship-it PR is ready to merge from a reviewer perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants