Files

1.9 KiB

Harley's Keyboard - agent notes

Fork of Julow/Unexpected-Keyboard (Unexpected Keyboard). Android IME, Java, Gradle Kotlin DSL.

Build & test (exact)

./gradlew testDebugUnitTest assembleDebug    # full verification: unit tests THEN the APK
./gradlew clean assembleDebug                # when a generated file may be stale
  • SDK: local.properties -> sdk.dir=/home/nyra/android-sdk (present, gitignored, do not commit).
  • JDK 21, build-tools 34.0.0/36.0.0, AGP 8.8.2, compileSdk 36, minSdk 21.
  • APK: build/outputs/apk/debug/Unexpected-Keyboard-debug.apk, package id harley.keyboard.

Layout & generated code

  • Layout rows live in srcs/layouts/*.xml. A layout edit needs a full build, not just compile: gen_layouts.py regenerates res/values/layouts.xml, res/raw/*.xml and srcs/juloo.keyboard2/ComposeKeyData.java. Unit tests run before regeneration report stale-generated-state failures that are not real bugs.
  • Never hand-edit generated files (res/values/layouts.xml, res/raw/*, ComposeKeyData.java, res/xml/method.xml).

Always do

  • Run ./gradlew testDebugUnitTest assembleDebug before reporting done.
  • Keep user-visible text in res/values/strings.xml.
  • Keep all network access off the UI thread.

Ask first

  • Adding any dependency (prefer the framework: org.json, HttpURLConnection).
  • Changing the package id, signing config or versionCode.

Never do

  • Commit or print secrets/tokens; no credentials in code, XML, tests or logs.
  • Touch .git internals, force-push, or edit CI workflows.
  • Enable cleartext HTTP globally (only a per-host network security config).
  • Change the space-bar peak-colour behaviour (a separate, deliberate feature).

Definition of done

./gradlew testDebugUnitTest assembleDebug exits 0, new behaviour is covered by unit tests, and the tree has no generated-file diffs beyond what a normal build produces.