Repository navigation
Commit e80ff51
build(android): Run Error Prone and NullAway on the Android modules
net.ltgt.errorprone dropped Android support in 3.0.0, which we have used since 6.7. Since then
it only enables Error Prone and adds it to the processor path for Gradle's JVM source sets. On
sentry-android-core and sentry-uitest-android the errorprone dependencies and the NullAway ERROR
setting had no effect, and the Java compile tasks ran plain javac.
Use the AGP variant API to add the errorprone configuration to each variant's annotation
processor configuration and enable Error Prone on its JavaCompile task. Both APIs exist in AGP
9.0.0, the oldest version in the AGP matrix.
Pass -XDandroidCompatible=true so Error Prone treats these modules as Android code: it skips
checks that don't apply there, such as DefaultCharset, and runs its Android checks.
sentry-uitest-android has no hand-written Java, so exclude the view binding classes AGP
generates, which trip LabelledBreakTarget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 94f84ca commit e80ff51
2 files changed
Lines changed: 29 additions & 9 deletions
File tree
- sentry-android-core
- sentry-android-integration-tests/sentry-uitest-android
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
81 | 90 | | |
82 | 91 | | |
83 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
143 | 154 | | |
144 | 155 | | |
145 | 156 | | |
| |||
0 commit comments