Commit 7d293fd
fix(android): consult overridable auto-upload closure at config time
Addresses review feedback: capturing `SENTRY_DISABLE_AUTO_UPLOAD` via
`System.getenv` at apply-time ignored a `project.ext.shouldSentryAutoUploadGeneral`
override set right after `apply from` (e.g. the Expo `disableAutoUpload` config
plugin, which injects `project.ext.shouldSentryAutoUploadGeneral = { -> return false }`).
Uploads would then run even when the user disabled them.
Now capture `shouldSentryAutoUploadGeneral()` inside the `onVariants` callback,
which runs after the app `build.gradle` has evaluated, so the override is in
effect. Likewise capture `shouldCopySentryOptionsFile()` via the closure rather
than re-reading the env var, so `project.ext` overrides of it keep working.
Both `onlyIf` specs still reference a captured boolean, so the tasks remain
Configuration Cache compatible, and the original override behavior is restored.
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Code <noreply@anthropic.com>1 parent 2a1daaa commit 7d293fd
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
506 | 513 | | |
507 | 514 | | |
508 | 515 | | |
| |||
0 commit comments