Repository navigation
Conversation
The tests/android module added in #147 only ran by hand against a local core checkout. This workflow runs it on PRs that touch the Android renderers, the module, composer.json or the workflow, using the nativephp/mobile copy Composer installs as the source of core's KeyboardFocusPolicy.kt and NativeUINode.kt, and core's own Gradle wrapper. It fails to compile against 4.6.0, which lacks the flush hook from mobile-air#565, and goes green once composer.json requires ^4.7. A workflow_dispatch input lets it run against dev-main until then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit cc99216. The job tests what composer.json resolves again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#147 added a Robolectric/Compose module under
tests/androidthat only runs by hand against a local core checkout. This adds.github/workflows/android-tests.ymlso it runs in CI.How it works:
composer update --no-devinstalls nativephp/mobile, and the module stagesKeyboardFocusPolicy.ktandNativeUINode.ktfromvendor/nativephp/mobile. mobile-air has no export-ignore rules, so the Composer dist includesresources/androidstudio.vendor/nativephp/mobile/resources/androidstudio/gradlew(8.14.5 today), the same command the module's README already documents. The module pins the same AGP as core (8.13.2), so the two move together.pathsfilters a whole workflow. It runs on changes toresources/android/**,tests/android/**,composer.jsonand the workflow file. main has no required status checks, so the filter can't block a merge.workflow_dispatchinput takes a nativephp/mobile version (for exampledev-main) to test against something other than what composer.json resolves.Expect this check to be red until #169
#147's editors pass a flush closure to
KeyboardFocusPolicy.fieldFocused, which only exists in core since mobile-air#565. 4.6.0 doesn't have it, so the module fails atcompileDebugKotlinwith "Too many arguments for fieldFocused". It goes green once #169 requires ^4.7.That compile error isn't specific to the test module. Any app on nativephp/mobile 4.6.0 that installs mobile-ui main will hit the same error in its Android build, and composer.json still allows 4.6.0. So #169 needs to land before the next mobile-ui tag.
Results
Locally I also ran the pre-#147 renderers against mobile-air main to check the tests catch the bug: 8 failed (every blur and debounce case) and the 4 live cases passed, matching what #147 reported.
The two dev-main proof commits are in the history (TEMP, then its revert). They'll disappear with the squash merge.
Not changed
I didn't use gradle/actions/setup-gradle. Its v6 moved caching into a proprietary component with separate terms of use, and setup-java's built-in Gradle cache is enough here.
The
Bridge.kt,Icon.ktandMenu.ktstubs stay. The realNativeUIBridgeforwards toNativeElementBridge(JNI and PHP), and the stub is where the test records events. The realMaterialIconloads core'sR.font.material_icons, which needs core's resources under thecom.nativephp.mobilenamespace. The realExpressiveMenuis inContainerRenderers.kt, which pulls inNodeViewand the renderer registry.Things to look at
stageSourcesreads. Core files come in throughcomposer.json, and any renderer this repo adds is already underresources/android/**.🤖 Generated with Claude Code