Skip to content

Tidy up test tags by stripping them in release builds#523

Open
davidjiagoogle wants to merge 1 commit into
mainfrom
david/stripTestTags
Open

Tidy up test tags by stripping them in release builds#523
davidjiagoogle wants to merge 1 commit into
mainfrom
david/stripTestTags

Conversation

@davidjiagoogle
Copy link
Copy Markdown
Collaborator

Introduced debugTestTag extension on Modifier to replace testTag.
In debug builds, it behaves normally.
In release builds, it is inlined as a no-op to optimize compilation and execution overhead.
Updated UI components across all screens to use debugTestTag.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the standard testTag modifier with a custom debugTestTag extension across several modules to ensure test tags are stripped in release builds. The review feedback identifies a violation of the DRY principle and namespace pollution, as the extension is duplicated across four modules and defined under a third-party package namespace; consolidating it into a shared module under a project-specific package is recommended. Additionally, a redundant testTag remains inside a semantics block in QuickSettingsComponents.kt, which defeats the purpose of the release-build stripping and should be removed.

@davidjiagoogle davidjiagoogle requested a review from temcguir May 28, 2026 23:02
Introduced debugTestTag extension on Modifier to replace testTag.
In debug builds, it behaves normally.
In release builds, it is inlined as a no-op to optimize compilation and execution overhead.
Updated UI components across all screens to use debugTestTag.
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.

1 participant