Building with HarmonyOS
Build, test, and deploy a project with Hvigor.
To build with Hvigor, the executor needs to have at least 4 vCPUs and 8 GB of memory, or higher.
Build on GUI
Add Build with HarmonyOS, when configuring build actions. Set the parameters according to Table 1.
Parameter |
Description |
---|---|
Action Name |
Assign a custom name to the build action. The name can contain:
|
Tool Version |
Currently, the default version HarmonyOS-API9 is supported. |
Commands |
Configure commands, or use the default ones. If you have special build requirements, enter your custom build script in the text box. |
Build with Code
Modify the code in the BUILD block in Creating a YAML File for Your Code-based Build by referring to the following sample code:
1 2 3 4 5 6 7 8 9 10 11 12 |
version: 2.0 # The value must be 2.0. steps: BUILD: - harmonyos: name: "HarmonyOS Build" inputs: command: | npm config set strict-ssl false npm config set registry=https://repo.huaweicloud.com/repository/npm/ npm config set @ohos:registry=https://repo.harmonyos.com/npm/ chmod +x hvigorw ./hvigorw clean assembleApp --no-daemon |
Parameter |
Type |
Description |
---|---|---|
command |
String |
Configure the HarmonyOS commands. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot