Skip to content

fix(instrumentation): Accept capitalized manifest booleans (GRADLE-124) - #1460

Merged
runningcode merged 2 commits into
mainfrom
no/gradle-124-capitalized-manifest-booleans
Sep 29, 2026
Merged

runningcode merged 2 commits into
mainfrom
no/gradle-124-capitalized-manifest-booleans

Conversation

@runningcode

Copy link
Copy Markdown
Contributor

What

Build-time manifest metadata now treats True/TRUE/False/FALSE as booleans, the same as aapt2 does. Before, only lowercase true/false counted as booleans, so capitalized values were injected as Strings and ManifestMetadataReader.readBool silently used each option's default instead.

Why

Apps that disable auto-init with io.sentry.auto-init="False" had it read as true, so SentryInitProvider initialized without a DSN and the app crashed on startup with DSN is required. Every Sentry Unity Android app hits this, because C# writes capitalized booleans. Regressed in #1405.

Fixes GRADLE-124
Fixes #1454

Notes

Mixed case such as tRuE intentionally stays a String. aapt2 doesn't compile it to a boolean either (checked with aapt2 from build-tools 37.0.0), so a case-insensitive check would differ from what the SDK reads without the plugin.

🤖 Generated with Claude Code

runningcode and others added 2 commits September 29, 2026 16:49
aapt2 compiles True/TRUE and False/FALSE meta-data values to booleans,
but build-time type inference only recognized lowercase true/false and
injected the rest as Strings. The SDK then fell back to each option's
default, so io.sentry.auto-init="False" was read as true and apps
without a manifest DSN crashed on startup.

Mixed case such as "tRuE" stays a String, matching aapt2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@linear-code

linear-code Bot commented Sep 29, 2026

Copy link
Copy Markdown

GRADLE-124

@runningcode runningcode added the sanity-check PR needs a lightweight review for obvious issues label Sep 29, 2026
@runningcode
runningcode marked this pull request as ready for review September 29, 2026 14:51

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

(T|t)hanks!

@runningcode
runningcode merged commit eeef71e into main Sep 29, 2026
28 checks passed
@runningcode
runningcode deleted the no/gradle-124-capitalized-manifest-booleans branch September 29, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build-time manifest metadata ignores capitalized booleans

2 participants