Files
web-terminal/android/settings.gradle.kts
Yaojia Wang 4ea8f7862a feat(android): pure-Kotlin foundation — AW0 scaffold + AW1 modules (218 tests green)
Implements the verifiable pure-Kotlin core of the Android client per
docs/ANDROID_CLIENT_PLAN.md, mirroring the iOS SPM package set as Gradle modules.
Built + reviewed via multi-agent workflow (explore→implement→verify→review),
then review findings fixed with regression tests.

Modules (all pure JVM, kotlin("jvm"); Android-framework modules scaffolded but
gated off in settings — no Android SDK in this env):
- :wire-protocol  — frozen wire contract (sealed Client/ServerMessage, enums,
  HostEndpoint CSWSH origin derivation, transport interfaces), hand-rolled codec
  byte-identical to the server's JSON.stringify + tolerant kotlinx decode.
- :session-core   — ReconnectMachine (1→2→4→8→16→30 backoff), PingScheduler,
  GateTracker (two-line epoch guard), AwayDigest, UnreadLedger, TitleSanitizer,
  KeyByteMap (byte-matches public/keybar.ts).
- :api-client     — all REST routes, tolerant decode, Origin-iff-guarded, prefs
  unknown-key preservation, pairing probe + host-tier classifier.
- :client-tls     — pure half: PKCS#12 parse, X509KeyManager alias logic,
  CertificateSummary, provider-agnostic wrong-passphrase classification.
- :test-support   — FakeTransport / FakeHttpTransport / virtual-clock fakes.

Verify: ./gradlew clean test → 218 tests, 0 failures (wire-protocol 47,
session-core 60, api-client 69, client-tls 27, test-support 15).

Review (3 lenses, 8/10 each) findings fixed: sessionId JSON-injection escape,
CancellationException propagation in PingScheduler, PairingProbe close-on-cancel
leak, HostEndpoint trim, HostClassifier hoisted to :wire-protocol (type unified),
BouncyCastle-portable wrong-passphrase detection, lone-surrogate escaping.

Known gap (documented, deferred): /push/fcm-token has no server route yet —
plan task A33 (src/push/fcm.ts) delivers it.
2026-07-08 13:45:07 +02:00

39 lines
1.4 KiB
Plaintext

pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
// google() is only needed by the Android-framework modules (see below).
// It requires the Android Gradle Plugin / SDK, absent in this env.
}
}
@Suppress("UnstableApiUsage")
dependencyResolutionManagement {
// Modules must not declare their own repositories.
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
}
// The version catalog at gradle/libs.versions.toml is auto-registered as `libs`.
}
rootProject.name = "webterm-android"
// ── Pure Kotlin/JVM modules (JVM-unit-testable; the 80% Kover targets) ──────────
// These build with the JVM toolchain only — NO Android SDK required.
include(":wire-protocol")
include(":session-core")
include(":api-client")
include(":client-tls")
include(":test-support")
// ── Android-framework modules ───────────────────────────────────────────────────
// Scaffolded (dirs + build.gradle.kts stubs exist) but NOT included, because this
// environment has NO Android SDK. Their build scripts apply `com.android.*`
// plugins that cannot resolve here.
// TODO(android-sdk): enable when an Android SDK is available.
// include(":app")
// include(":terminal-view")
// include(":host-registry")
// include(":client-tls-android")