The best way to control Claude Code, Codex and more from any computer or phone
| 1 | # Android native regressions |
| 2 | |
| 3 | From the repository root: |
| 4 | |
| 5 | ```sh |
| 6 | apps/mobile/modules/t3-review-diff/tests/run-android.sh |
| 7 | ``` |
| 8 | |
| 9 | Requires JDK 17+ (`JAVA_HOME`) and Gradle on `PATH`. Tested with JDK 17 and |
| 10 | Gradle 9.4.1. To use another installed Gradle or a wrapper, set |
| 11 | `GRADLE=/absolute/path/to/gradle` before the command. The runner resolves its own |
| 12 | location, so it also works from other directories. Gradle test options are |
| 13 | forwarded, for example `--tests '*ReviewDiffViewportTest' --rerun-tasks`. |
| 14 | |
| 15 | This standalone JVM build registers the viewport and geometry regressions and the |
| 16 | module's existing `android/src/test` layout suite with Gradle's `test` task. It |
| 17 | compiles the module's actual Android view, drawing, and layout sources. Pinned Maven dependencies supply Kotlin, Robolectric, Android API 35, |
| 18 | and AndroidX test classes. The first run requires access to Maven Central and |
| 19 | Google Maven, including Robolectric's runtime SDK download. No local Android |
| 20 | SDK, Expo prebuild, device, temporary checkout, or pre-extracted jars are needed. |
| 21 | Generated files stay in ignored `build/` and `.gradle/` directories; the HTML |
| 22 | report is `build/reports/tests/test/index.html`. |
| 23 | |
| 24 | The three files under `stubs/expo/modules/kotlin/` replace only Expo's context, view base class, and event |
| 25 | dispatcher. Events go to a per-test context instead of a React Native bridge. |
| 26 | This checks reset/decode ordering, stale-row removal, and viewport publication |
| 27 | in the real view, but does not validate Expo registration, JS event delivery, |
| 28 | native libraries, or device rendering. These stubs are exclusive to this |
| 29 | standalone build and must not be added to the production Android source set. |
| 30 | Geometry regressions bound sticky-header row reads, check lazy ASCII layout |
| 31 | retention and syntax invalidation, and compare ASCII widths against Android |
| 32 | paint metrics. Native shaping tests cover tabs, Unicode clusters, and styled |
| 33 | word-diff spans. |