ohbuild

Automate OpenHarmony HAP build and signing workflows in Linux environments.

Updated Oct 28, 2024
One-click install
npx skills add https://github.com/openharmony/napi_generator --skill ohbuild
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ohbuild
Source: https://github.com/openharmony/napi_generator/tree/main/src/skills/ohhap
Command: npx skills add https://github.com/openharmony/napi_generator --skill ohbuild

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates end-to-end OpenHarmony HAP build and signing workflows, reducing manual setup and errors.

Core Features & Use Cases

  • Environment checks: validates required tools and environment variables.
  • Version verification: ensures SDK and project configurations are aligned.
  • HAP build: compiles the HAP package.
  • HAP signing: signs the built HAP with provided certificates.
  • Output validation: locates and verifies generated HAP files.

Quick Start

Run the hapbuild.py script in your project root to build and sign your OpenHarmony HAP package.

Frequently Asked Questions about ohbuild

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate OpenHarmony HAP build and signing in a Linux environment?

Automate OpenHarmony HAP build and signing by running the hapbuild.py script in your project root, which orchestrates environment validation, compilation, and artifact signing automatically. It reduces manual setup and errors.

What environment variables and configurations are required to build OpenHarmony HAP apps?

Building OpenHarmony HAP apps requires setting the HOS_CLT_PATH and OHOS_SDK_PATH environment variables, and parsing build-profile.json5 to ensure your SDK and project configurations are correctly aligned.

Does the OpenHarmony HAP build workflow support version verification for SDK and project configurations?

Yes, the OpenHarmony HAP build workflow implements version verification to ensure your SDK and project configurations are aligned before compiling, preventing compatibility issues during the build and signing process.

How do I verify generated OpenHarmony HAP files after an automated build and signing process?

Verify generated OpenHarmony HAP files through the workflow's output validation step, which automatically locates and checks the compiled and signed HAP artifacts to ensure successful generation.

Why does my OpenHarmony HAP build fail before signing during environment validation?

Your OpenHarmony HAP build may fail if required tools are missing or environment variables like HOS_CLT_PATH and OHOS_SDK_PATH are not properly configured during the initial environment validation stage.

Can I use hvigor to clean, build, and sign OpenHarmony HAP packages end-to-end?

Yes, the automated workflow orchestrates hvigor steps through hapbuild.py to clean, build, sign, and verify OpenHarmony HAP packages end-to-end, streamlining the entire development lifecycle.