Skip to content

Add Distribution API to Sentry Android Gradle Plugin#986

Merged
runningcode merged 5 commits into
mainfrom
no/eme-277-add-build-distribution-api-to-sentry-android-gradle-plugin
Sep 17, 2025
Merged

Add Distribution API to Sentry Android Gradle Plugin#986
runningcode merged 5 commits into
mainfrom
no/eme-277-add-build-distribution-api-to-sentry-android-gradle-plugin

Conversation

@runningcode

@runningcode runningcode commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Add DistributionExtension with enabledVariants property
  • Add distribution configuration DSL to SentryPluginExtension
  • Mark API as @Experimental

Details

This adds the API to specify which build variants should have distribution enabled. No functionality is wired yet - this is just the API surface.

This API is opt in (unlike the rest of Sentry features) because users need to explicitly choose which variants get build distribution. For example: a typical set up will disable distribution for release builds but enable them for internal testing builds like a nightly release or alpha testing. Users will also typically want this behavior disabled for debug builds.

Usage:

sentry {
  distribution {
    enabledVariants.set(["nightlyRelease", "alphaRelease"])
  }
}

#skip-changelog (Until this feature is wired up)

Closes EME-277

🤖 Generated with Claude Code

Add BuildDistributionExtension with enabledFor property to specify
which build variants should have build distribution enabled.

This commit only adds the API - no functionality is wired yet.

Usage:
```gradle
sentry {
  buildDistribution {
    enabledFor.set(["freeDebug", "paidRelease"])
  }
}
```

Closes EME-277

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@linear

linear Bot commented Sep 17, 2025

Copy link
Copy Markdown

- Rename BuildDistributionExtension to DistributionExtension
- Rename buildDistribution DSL to distribution
- Update tests and class names accordingly
@runningcode runningcode changed the title Add Build Distribution API to Sentry Android Gradle Plugin Add Distribution API to Sentry Android Gradle Plugin Sep 17, 2025
- Rename enabledFor to enabledVariants for clarity
- Add documentation clarifying that global ignore settings
  have no relation to distribution settings
- Keep @experimental annotation for new APIs
- Import @experimental annotation in SentryPluginExtension for cleaner usage
- Apply spotless formatting to comment wrapping
- Use consistent short @experimental annotation form

@romtsn romtsn 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.

considering the comments from @chromy all lgtm 👍

@chromy chromy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, thanks!

@runningcode runningcode merged commit 02529c6 into main Sep 17, 2025
19 checks passed
@runningcode runningcode deleted the no/eme-277-add-build-distribution-api-to-sentry-android-gradle-plugin branch September 17, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants