1# Integrated HSP
2
3The integrated HSP is an intermediate build product of the intra-application HSP. It aims to solve the strong coupling between the bundle name and signature of the user.
4> **NOTE**
5> The HSP can be used only by projects with the same bundle name, but the integrated HSP can be used by projects with different bundle names.
6
7## Use Scenario
8Multiple applications in a group can use the same dynamic shared package. To reduce development costs and share code and resources, multiple applications can share one infrastructure HSP (integrated HSP).
9
10## Constraints
11- The integrated HSP is only available for the [stage model](application-package-structure-stage.md).
12- Only integrated HSP of API version 12 or later is supported. You should set the **useNormalizedOHMUrl** field to **true** in the project-level [build-profile.json5](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V13/ide-hvigor-build-profile-V13#section511142752919) file.
13
14## Development Instructions
151. Project configuration for creators: Set the **useNormalizedOHMUrl** field to **true** in the project-level **build-profile.json5** file to configure the integrated HSP.
16
17    ```json
18    // created_party_project/build-profile.json5
19    {
20      "app": {
21        "products": [
22          {
23            "name": "default",
24            "signingConfig": "default",
25            "compatibleSdkVersion": "5.0.0(12)",
26            "runtimeOS": "HarmonyOS",
27            "buildOption": {
28              "strictMode": {
29                "useNormalizedOHMUrl": true
30              }
31            }
32            // ...
33          }
34        ]
35        // ...
36      }
37    }
38    ```
392. Module configuration for creators: Modify the module-level build configuration file **build-profile.json5** and set **integratedHsp** to **true** to specify the HSP module to be built as the integrated HSP module.
40
41    ```json
42    // created_party_project/library/build-profile.json5
43    {
44      "apiType": "stageMode",
45      "buildOption": {
46        "arkOptions": {
47          "integratedHsp": true
48        }
49      }
50    }
51    ```
52
533. Packaging configuration for creators (.tgz Package)
54
55    (1) Configure project signature information. For details, see [Signing Your App/Atomic Service](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V13/ide-signing-V13).
56
57    (2) Configure the release mode.
58
59    ![](./figures/ide-release-setting.png)
60
61    (3) Select the **library** directory in **Build** -> **Make Module 'library'**.
62
634. Directory creation for users: Create a **libs** directory in the **entry** directory and copy the .tgz file to the created directory.
64
655. Project dependency configuration for users: Add dependencies to the **oh-package.json5** configuration file in the main module.
66
67    ```json
68    // user_project/entry/oh-package.json5
69      "dependencies": {
70        "hsp": "./libs/library-default.tgz"
71      }
72    ```
73
746. Project configuration for users: Set the **useNormalizedOHMUrl** field to **true** in the project-level **build-profile.json5** file to configure the integrated HSP.
75    ```json
76    // user_project/build-profile.json5
77    {
78      "app": {
79        "products": [
80          {
81            "name": "default",
82            "signingConfig": "default",
83            "compatibleSdkVersion": "5.0.0(12)",
84            "runtimeOS": "HarmonyOS",
85            "buildOption": {
86              "strictMode": {
87                "useNormalizedOHMUrl": true
88              }
89            }
90          }
91        ]
92      }
93    }
94    ```
95    > **NOTE**
96    > Before installing and running an application, the user must configure the project signature information. For details, see [App/Service Signature](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V13/ide-signing-V13).
97