From 7a654993243837961174f62c15b640afd73ca18d Mon Sep 17 00:00:00 2001 From: lijunru Date: Mon, 7 Nov 2022 17:06:46 +0800 Subject: [PATCH] Generate module info in the ninja phase Signed-off-by: lijunru Change-Id: I3e365e2477e9172de0d597af1ee8e1c6c5938d12 --- BUILD.gn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 3f503cae7..05e562c18 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -65,6 +65,7 @@ if (!sdk_build_public) { template("ohos_declaration_template") { forward_variables_from(invoker, "*") + _module_info_target = "/ohos_declaration/${target_name}_info" action_with_pydeps(target_name) { script = "//interface/sdk-js/remove_internal.py" input_api_dir = "//interface/sdk-js/api" @@ -80,8 +81,12 @@ template("ohos_declaration_template") { rebase_path(root_out_dir + "/ohos_declaration/$target_name/", root_build_dir), ] + if (defined(deps)) { + deps += [ ":$_module_info_target" ] + } else { + deps = [ ":$_module_info_target" ] + } } - _module_info_target = "/ohos_declaration/${target_name}_info" _target_name = target_name generate_module_info(_module_info_target) { module_type = "jsdoc"