Commit b9053bf
Fail the build on undersized localized launcher icons
Localized launcher icons (cn1_icon_<lang>[_<country>].png) are scaled up
to the largest launcher density at build time, so a low-resolution source
produces a blurry icon. Two related problems were reported on Android:
1. A small localized icon was upscaled and shipped blurry with no warning.
2. Maven copies these resources into target/classes incrementally and does
not delete stale copies when a source icon is removed/renamed, so an old
low-res icon kept getting bundled until 'mvn clean' was run manually.
This adds a hard build failure (not just a warning) when a localized icon
is smaller than the size it would be upscaled to (192px normally, 432px for
the adaptive foreground), so a soft icon can no longer reach production:
- AndroidGradleBuilder.processLocalizedIcons: collects undersized icons and
throws a BuildException with a clear message before producing the APK.
- CN1BuildMojo: scans the compiled output (target/classes) that is about to
be bundled and sent to the build server and fails with a MojoFailureException,
pointing at stale copies and recommending 'mvn clean'.
Docs updated with the resolution recommendation and the stale-resource note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 210c8c3 commit b9053bf
3 files changed
Lines changed: 104 additions & 3 deletions
File tree
- docs/developer-guide
- maven/codenameone-maven-plugin/src/main/java/com/codename1
- builders
- maven
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
462 | 466 | | |
463 | 467 | | |
464 | 468 | | |
| |||
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4966 | 4966 | | |
4967 | 4967 | | |
4968 | 4968 | | |
4969 | | - | |
| 4969 | + | |
4970 | 4970 | | |
4971 | 4971 | | |
4972 | 4972 | | |
| |||
4977 | 4977 | | |
4978 | 4978 | | |
4979 | 4979 | | |
| 4980 | + | |
| 4981 | + | |
| 4982 | + | |
| 4983 | + | |
| 4984 | + | |
| 4985 | + | |
4980 | 4986 | | |
4981 | 4987 | | |
4982 | 4988 | | |
| |||
5013 | 5019 | | |
5014 | 5020 | | |
5015 | 5021 | | |
| 5022 | + | |
| 5023 | + | |
| 5024 | + | |
| 5025 | + | |
| 5026 | + | |
| 5027 | + | |
| 5028 | + | |
5016 | 5029 | | |
5017 | 5030 | | |
5018 | 5031 | | |
5019 | 5032 | | |
5020 | 5033 | | |
5021 | 5034 | | |
| 5035 | + | |
| 5036 | + | |
| 5037 | + | |
| 5038 | + | |
| 5039 | + | |
| 5040 | + | |
| 5041 | + | |
5022 | 5042 | | |
5023 | 5043 | | |
5024 | 5044 | | |
| |||
Lines changed: 78 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
163 | 238 | | |
164 | 239 | | |
165 | 240 | | |
| |||
323 | 398 | | |
324 | 399 | | |
325 | 400 | | |
326 | | - | |
| 401 | + | |
327 | 402 | | |
328 | 403 | | |
329 | 404 | | |
| |||
354 | 429 | | |
355 | 430 | | |
356 | 431 | | |
| 432 | + | |
| 433 | + | |
357 | 434 | | |
358 | 435 | | |
359 | 436 | | |
| |||
0 commit comments