feat(sizeAnalysis): Add enabledVariants property to bypass global ignore rules#1016
Closed
runningcode wants to merge 1 commit intomainfrom
Closed
feat(sizeAnalysis): Add enabledVariants property to bypass global ignore rules#1016runningcode wants to merge 1 commit intomainfrom
runningcode wants to merge 1 commit intomainfrom
Conversation
…ore rules This change adds a new `enabledVariants` property to `SizeAnalysisExtension` that allows size analysis to run on specific variants, bypassing the global ignore settings (`ignoredVariants`, `ignoredBuildTypes`, `ignoredFlavors`). Key changes: - Added `enabledVariants: SetProperty<String>` to SizeAnalysisExtension - Added `calculateSizeAnalysisEnabled()` helper function that bypasses `isVariantAllowed` - Refactored variant filtering in AndroidComponentsConfig to handle size analysis independently - Size analysis and distribution features now use independent variant filtering - When `enabledVariants` is empty (default), size analysis runs on all variants (backward compatible) - The global `enabled` flag still acts as a master kill-switch This provides consistency with the distribution feature's filtering approach while maintaining backward compatibility with existing configurations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- Add enabledVariants property to bypass global ignore rules ([#1016](https://github.com/getsentry/sentry-android-gradle-plugin/pull/1016))If none of the above apply, you can opt out of this check by adding |
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.
Summary
Adds a new
enabledVariantsproperty toSizeAnalysisExtensionthat allows size analysis to run on specific variants, bypassing the global ignore settings (ignoredVariants,ignoredBuildTypes,ignoredFlavors).This provides fine-grained control over which variants have size analysis enabled, similar to how
distribution.enabledVariantsworks.Changes
enabledVariantsproperty toSizeAnalysisExtensionwith detailed documentation about bypassing behaviorcalculateSizeAnalysisEnabled()helper function that handles variant filtering independently fromisVariantAllowedAndroidComponentsConfigto handle size analysis and distribution filtering independentlyenabledVariantspropertyBehavior
Empty
enabledVariants(default)Size analysis runs on all variants (backward compatible).
Specified variants
Size analysis runs only on specified variants.
Bypassing global ignores
Size analysis can run on variants that are globally ignored.
Master kill-switch
The
enabledflag still acts as a master kill-switch.Known Issues
size analysis runs on all variants when enabledVariants is empty and enabled is truesize analysis only runs on specified variants when enabledVariants is not emptysize analysis bypasses ignoredVariants when enabledVariants is setThese will be fixed before marking the PR as ready for review.
🤖 Generated with Claude Code