Skip to content

fix(ohos): add explicit ArkTS plugin types - #78

Merged
Shinokawa merged 1 commit into
AimesSoft:mainfrom
aozaoz112233:codex/fix-ohos-arkts-explicit-types
Aug 4, 2026
Merged

fix(ohos): add explicit ArkTS plugin types#78
Shinokawa merged 1 commit into
AimesSoft:mainfrom
aozaoz112233:codex/fix-ohos-arkts-explicit-types

Conversation

@aozaoz112233

Copy link
Copy Markdown

Summary

Fix the HarmonyOS ArkTS build failure caused by strict arkts-no-any-unknown checks in ErikaFlutterPlugin.ets.

The affected expressions read ESObject values from Map<string, ESObject> or construct typed maps, but ArkTS inferred them as implicit any/unknown in the NipaPlay HarmonyOS build.

Changes

  • Add explicit ESObject types to media metadata values.
  • Add explicit Map<string, ESObject> types to copied/native argument maps.
  • Add a regression contract test covering all affected declarations.
  • Keep runtime behavior and the Flutter API unchanged.

Validation

  • flutter test --no-pub --reporter expanded test/ohos_screenshot_contract_test.dart
    • 4 tests passed.
  • Built NipaPlay from its current main branch with the fixed local Erika plugin:
    • Flutter 3.35.8-ohos-1.0.1
    • flutter build hap --release --no-pub --no-codesign --target-platform ohos-arm64
    • Build succeeded and produced a 133.9 MB unsigned HAP.
    • Verified the HAP contains both liberika_capi.so and liberika_flutter.so.

This fixes the failure seen in AimesSoft/NipaPlay-Reload Actions run 30883242192.

Compatibility

This change only touches the HarmonyOS ArkTS plugin implementation and its contract test. Android, iOS, macOS, Windows, and Linux code paths are unchanged.

@Shinokawa
Shinokawa merged commit 409b46e into AimesSoft:main Aug 4, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants