impl android library

Merged
SE
4mo ago
+8719-213

Summary by cubic

Add the Android SDK to serve .wvb bundles in WebView, plus a minimal test app and CI-backed end-to-end tests. Pin the FFI version for reproducible installs.

  • New Features

    • Android library :lib: WebViewBundle with request interception for https://<bundle>.wvb/*, WebViewBundleClient, WebViewBundleProtocol (passthrough rules), and BundleSource with Android defaults for builtin/remote bundles.
    • WebViewSetup: recommended WebView settings and optional service-worker interception via androidx.webkit; safe defaults with an escape hatch for custom tweaks.
    • Test app :testapp: installs the library into a full-screen WebView and loads the builtin hacker-news bundle from assets/bundles at https://hacker-news.wvb/.
    • E2E e2e/: Appium + WebdriverIO + Vitest run shared @wvb-playground/webview-hacker-news tests; APK built in global setup; emulator + drivers managed programmatically; CI workflow builds :lib/:testapp and runs the suite on Linux with KVM.
    • Build setup and deps: add androidx.annotation, androidx.webkit, and kotlinx-coroutines-android; switch JNA to the Android AAR (net.java.dev.jna:jna:<version>@aar); increase Gradle daemon heap/metaspace; enable android.useAndroidX=true.
  • Bug Fixes

    • Add lib/lint.xml to ignore a false NewApi warning in generated wvb_ffi.kt, fixing release lint in CI.