目录

How do I reference a HAR or HSP?

During HarmonyOS application development, referencing modules (HARs and HSPs) is a common scenario. Proper referencing ensures code modularity, reduces maintenance costs, and streamlines team collaborations. The following are recommended and non-recommended approaches for referencing modules.

To maintain code modularity, enhance maintainability, and simplify team collaboration, always use package names, instead of relative or absolute paths, for dependency references between modules. For more information, see HAR.