Skip to content

Android support — track #32

Description

@LeslieOA

Tracking issue for Android support, the third platform alongside iOS and macOS.

Backing library

Sora-Editor by Rosemoe. The only viable native Android source-editor library — actively maintained (~87 commits / 90 days), TextMate and Tree-sitter highlighting (richer than STTextView), real production use inside AndroidIDE. The Android ecosystem is a near-monoculture here; alternatives are all regex-only, stale, or hobby-grade.

Known risks (proceeding eyes-open)

  • License: LGPL-2.1. Consumed dynamically as a Gradle implementation AAR (no source modification, no static linking) it's compatible with permissive downstream apps. README must document the inheritance.
  • Bus factor ≈ 1. Single maintainer (1,954 commits vs feat(macos): add macOS platform target to Expo Module #2 at 240).
  • Perpetual 0.x. Every release marked prerelease; expect ~yearly breaking changes (e.g. 0.23→0.24 made Span an interface).
  • NDK/JNI via oniguruma for TextMate regex → multi-ABI APK size impact.

Sub-tasks

Each becomes a separate PR. The tracking issue stays open until the last one lands.

  • Fabric skeleton + MVP — wipe the legacy Expo-module stub in android/. Bare-RN Fabric component setup (Gradle, manifest, codegen wiring, ReactPackage). MVP props: `text`, `editable`, `onChangeText`, `onSelectionChange`, focus/blur ref. Sora-Editor embedded but no highlighting / theming yet. Goal: render an editable Sora editor in an example app and round-trip text changes.
  • Android example app — `example/android-app/` (bare RN, mirrors `example/macos-app/` shape). Workflow scripts: `android:install`, `android:start`, `android:run`, `android:dev`.
  • `font` + `contentInsets` + `lineNumbers` — wire to Sora's typeface, padding, line-number gutter APIs.
  • `theme` (light/dark/auto) — map to Sora's color schemes.
  • `language` (highlighting) — wire to Sora's TextMate language registry. Match the existing iOS/macOS language set: plaintext, markdown, json, javascript, typescript, html.
  • CI — extend `.github/workflows/ci.yml` to build Android.
  • Docs — README platform table, `docs/installation.md` Android section, `docs/examples.md` Android row, CHANGELOG entry. Document LGPL-2.1 inheritance from Sora-Editor.

Out of scope here

Code folding, autocomplete, find/replace — these are post-parity work, separate issues if filed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidTested on AndroidenhancementNew feature or request

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions