Commit 7938856
feat(snapshots): Restructure sidecar JSON to match ingestion schema (#1162)
* feat(snapshots): Restructure sidecar JSON to match ingestion schema
Bucket appearance inputs (locale, device, font_scale, api_level,
width_dp, height_dp, show_system_ui, show_background, preview_name)
under `tags`; move preview identity (class_name, method_name,
image_file_name) under `context`; replace the `night_mode` boolean
with a `color_mode` enum that is emitted only when `uiMode` explicitly
sets `UI_MODE_NIGHT_YES` or `UI_MODE_NIGHT_NO`.
The serializer is extended with a small recursive `renderJson`
helper so the template can emit nested objects without pulling in a
JSON library.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(snapshots): Move ui_mode into sidecar tags block
Relocate the uiMode → light/dark mapping from the top-level
metadata field `color_mode` into the `tags` map, keyed as
`ui_mode`. This aligns the field with the other appearance
inputs (locale, device, font_scale, etc.) and matches the
ingestion schema's expectation that preview configuration
travels as tags rather than first-class metadata.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 055f0a6 commit 7938856
2 files changed
Lines changed: 88 additions & 16 deletions
File tree
- plugin-build/src
- main/kotlin/io/sentry/android/gradle/snapshot
- test/kotlin/io/sentry/android/gradle/snapshot
Lines changed: 44 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
360 | | - | |
361 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
362 | 378 | | |
363 | 379 | | |
364 | 380 | | |
365 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
366 | 386 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | 387 | | |
378 | 388 | | |
379 | 389 | | |
| |||
386 | 396 | | |
387 | 397 | | |
388 | 398 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
393 | 403 | | |
394 | 404 | | |
395 | 405 | | |
396 | 406 | | |
397 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
398 | 426 | | |
399 | 427 | | |
400 | 428 | | |
| |||
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 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 | + | |
149 | 193 | | |
150 | 194 | | |
151 | 195 | | |
| |||
0 commit comments