also looking at this
feat: finish native customization and platform seams
#401
21 files
+707
-17
| @@ -484,6 +484,29 @@ changes; the other two values pin the generated host. If it is omitted, | ||
| 484 | 484 | `darkMode` remains the compatibility switch (`false` pins light, `true` pins |
| 485 | 485 | dark). |
| 486 | 486 | |
| 487 | Native tab-bar selection styling is opt-in and lives in the generated config, | |
| 488 | so the generated Kotlin never needs to be patched: | |
| 489 | ||
| 490 | ```json | |
| 491 | { | |
| 492 | "tabBar": { | |
| 493 | "selection": { "cornerRadius": 8, "color": "#123456" } | |
| 494 | }, | |
| 495 | "postGenerate": { | |
| 496 | "command": "bun", | |
| 497 | "args": ["run", "scripts/customize-native.ts"] | |
| 498 | } | |
| 499 | } | |
| 500 | ``` | |
| 501 | ||
| 502 | `cornerRadius` is measured in dp and `color` is `#RRGGBB`; omit either to keep | |
| 503 | its host default. `postGenerate` runs from the generated project root during | |
| 504 | `craft android build`, before Gradle compiles the app. Craft passes | |
| 505 | `command` and `args` directly without a shell, and supplies | |
| 506 | `CRAFT_PROJECT_ROOT`, `CRAFT_PLATFORM=android`, and | |
| 507 | `CRAFT_GENERATE_PHASE=build`. An invalid command or non-zero exit fails the | |
| 508 | build and includes the hook's stderr in the diagnostic. | |
| 509 | ||
| 487 | 510 | Remote app and trusted-origin URLs must use HTTPS. Local development may use |
| 488 | 511 | HTTP with `localhost`, `127.0.0.1`, or the Android emulator host `10.0.2.2`. |
| 489 | 512 | Origins are normalized before they are stored, and a configured development |