0
Fork 0
mirror of https://github.com/XiaochangXu/AVBox.git synced 2026-10-24 07:09:08 +00:00
AVBox/quickjs
XiaochangXu 6fbc81d71c refactor(quickjs): migrate the local wrapper layer from Java to Kotlin
- migrate the 4 Java files under quickjs/src/main/.../wrapper to Kotlin
  (ContextSetter, Function, JSUtils, UriUtil); the module now has 0 Java
- clarify that quickjs/ is not vendored code: the real third-party part is the
  wang.harlon.quickjs maven dependency (wrapper-java 3.2.3, 21 classes), which
  cannot be migrated because the native side matches it by name; only the 4
  locally written files were converted
- keep the bytecode contract identical: UriUtil keeps its 4 public statics and
  JSUtils keeps isEmpty/isNotEmpty/toJsonObject/toJsonArray plus the instance
  methods, all with unchanged descriptors; the only rename is
  toArray(byte[]) -> toByteArray (no call site uses it)
- keep @Retention(RUNTIME) on both annotations explicit, and restore the AOSP
  and caoccao Apache-2.0 headers the port had dropped
- add UriUtilTest (13 cases) written against the Java version first, so the
  Kotlin port is proven equivalent by tests rather than by inspection;
  resolveToUri stays untested because Uri.parse returns null under Robolectric
- quickjs: add the kotlin.android plugin and set jvmTarget to 21
- full :app:testDebugUnitTest is 904 cases / 0 failures / 1 skipped
- record the rules and pitfalls in the Kotlin migration spec (section 7.24)
History 2026-10-10 11:12:40 +08:00
..
src/main refactor(quickjs): migrate the local wrapper layer from Java to Kotlin 2026-10-10 11:12:40 +08:00
build.gradle.kts refactor(quickjs): migrate the local wrapper layer from Java to Kotlin 2026-10-10 11:12:40 +08:00