1 -> Task flow chart
1.1 -> HAP Basic Task Flow Chart
1.2 -> Flowchart of HSP basic tasks
1.3 -> Flowchart of HAR basic tasks
2 -> Use the command to view the task
In DevEco Studio, you can run the following command to obtain task-related information:
hvigorw taskTree
When you get the task tree, the task tree registered in the module will be output in the following figure according to the module in the project:
As shown in the figure, assembleHap depends on signHap, and signHap depends on packageHap. The task execution order is packageHap->signHap->assembleHap.
3 -> Detailed description of the task
According to the different tasks and functions, they are mainly divided into the following types of tasks.
3.1 -> Hook
assembleHap compiles the hook task that builds the hap module.
assembleHsp: Compiles the hook task of building the hsp module.
assembleHar compiles the hook task that builds the har module.
assembleAppCompile the hook task of building the app module.
assembleDevHqf supports incremental deployment of hook tasks.
HotReloadBuild HotReloadArkTS pre-hook task.
PreviewBuild PreviewArkTS pre-hook task.
buildHotReloadResource Hotload a pre-hook task related to a hot loaded resource.
PreviewHookCompileResource Preview: Whether the Restool incremental compilation of the Hook task supports the PreviewHookCompileResource preview.
GenerateBuildProfile Generate the Hook task of the BuildProfile.ets file.
BuildUnitTestHook: A pre-hook task related to the compilation of resource resources for unit tests.
buildPreviewerResource previews the pre-hook tasks related to the resource.
compileNative native resource related pre-hook tasks.
UnitTestBuild UnitTestArkTS precedent hook task.
test uses the CLI to execute the Local Test hook task.
onDeviceTest uses the command line to execute the Instrument Test hook task.
3.2 -> ArkTS
CompileArkTS/BuildArkTS call the loader to compile the ArkTS source code.
In PreviewArkTS preview mode, call the loader to compile the ArkTS source code.
HotReloadArkTS In a hot-loading scenario, call the loader to compile the ArkTS source code.
OhosTestCompileArkTS/OhosTestBuildArkTS In the ohos test scenario, call loader to compile the ArkTS source code.
HarCompileArkTS/HarBuildArkTS In the scenario of building a HAR package, call the loader to compile the ArkTS source code.
UnitTestArkTS In the unit test scenario, call the loader to compile the ArkTS source code.
3.3 -> JS
CompileJS/BuildJS calls loader to compile js source code.
In the OhosTestCompileJS/OhosTestCompileJS ohos test scenario, call loader to compile the js source code.
3.4 -> Resources
ProcessResource processes and generates intermediate files that compile resources as files.
In the PreviewProcessResource preview scenario, intermediate files that compile resources in file form are processed and generated.
CompileResource calls restool to compile the resource.
In the preview scenario, call restool to compile the resource.
ProcessLibs collects .so files in hap and har dependencies.
3.5 -> Package
PackageHap calls the packaging tool to play hap packages.
PackageHar calls the packaging tool to har the package.
PackageHsp calls the packaging tool to play the hsp package.
PackageApp calls the packaging tool to play the app package.
PackageHqf calls the packaging tool to increment the package.
PackageSharedHar calls the packaging tool to play the har package of the hsp module.
PackageSharedTgz calls the packaging tool to package the unsigned hap and har packages generated by the hsp module into a tgz package.
PackageSignHar invokes the packaging tool to create a signed har package, which currently takes effect only in daemon mode.
3.6 -> Sign
SignHap invokes the signature tool to sign the hap package.
SignHsp calls the signature tool to sign the hsp package.
SignApp invokes the signing tool to sign the app package.
SignHqf invokes the signing tool to sign the incremental package.
SignModuleRemoteHsp calls the signature tool to sign the hsp package on the module-level ohpm repository.
SignProjectRemoteHsp calls the signature tool to sign the hsp package on the project-level ohpm repository.
3.7 -> Verification
PreBuild module-level precheck tasks.
PreBuildApp project-level pre-check task.
PreCheckSyscap Configure a precheck task related to syscap.
3.8 -> Generate
GenerateLoaderJson generates loader.json file.
GenerateMetadata generates metadata.json files.
SyscapTransform syscap transformation task.
MakePackInfo generates pack.info at the module level.
MakeProjectPackInfo generates a project-level pack.info.
ProcessPackageJson processes the package.json file.
ProcessOHPackageJson processes the oh_package.json5 file.
GeneratePackRes generates the pack.res file.
CreateBuildProfile Generate the BuildProfile.ets file for hap/hsp.
CreateHarBuildProfile Generate the BuildProfile.ets file of the har.
PrepareQuickfix fetches the delta file by checking it and outputs it to the quiekfix.json file.
3.9 -> Config
ProcessProfile handles the module.json5 file.
PrepareSharedHarResource generates package.json and module.json for packaged shared libraries.
UnitTestProcessProfile The UnitTestBuild scenario processes the module.json file of the build intermediate.
MergeProfile merges the module.json5 file.
In PreviewUpdateAssets preview mode, the Stage model updates the module.json and main_pages.json files generated by the pre-task before compiling the preview code.
3.10 -> Native
BuildNativeWithNinja compiles native code into a so file.
BuildNativeWithCmake uses CMake to compile the CPP source code.
3.11 -> Help
tasks View all of Hvigor's tasks and their details.
taskTree View the task tree involved in the current project.
3.12 -> Other
ReplaceUnitTestIndexFile unit test replaces the entry file.
ReplacePreviewerPage accepts the parameters provided by the previewer to replace the parameters in the page file.
OhosTestCopyMockConfigJson The test framework copies the mock-config.json to the test package when it executes a mock.
clean cleans the generated Build directory.
collectCoverage generates a coverage statistical report based on the gauge dot data.
3.13 -> Sync
init initialization project.
3.14 -> Init
This task type is different from init in Sync, which does not have a specific task and is mainly responsible for preparing for the invocation of hvigor.
Top comments (0)