| name | harmony-build |
| description | Runs OHPM and Hvigor build steps for this HarmonyOS repo using the project manifest. Use when compiling the app, after dependency changes, or as the first step of an autofix loop. |
harmony-build
Before running
- Read
.cursor/ohos-dev-commands.md section Build.
- Apply
safe-command-policy: run the exact or manifest-approved ohpm / hvigorw lines.
Steps
ohpm install from project root (unless manifest says already satisfied).
hvigorw assembleHap (assumes hvigorw is installed and available on PATH; or use the manifest’s module-scoped assembleHap, e.g. hvigorw -p module=entry@default assembleHap).
- Zero ArkTS warnings: confirm the compile log has no
ArkTS:WARN lines (see .cursor/ohos-dev-commands.md ArkTS compiler warnings). Fix deprecations before claiming green.
On success
Proceed to harmony-codelinter (static analysis; see .cursor/ohos-dev-commands.md CodeLinter), then to harmony-unit-test in a full loop, or as orchestrated. Command-line options: docs/arkts-references/codelinter.md.
On failure
- Capture** stderr/stdout** tail.
- Hand to
harmony-log-analyzer then test-failure-classifier (expect compile or env-infra if SDK).
Do not start the emulator in this phase.