diff --git a/BUILD.gn b/BUILD.gn index 6057e669ee..6fe8c9ca2b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -11,6 +11,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("//build/ohos.gni") +import("//build/ohos/notice/notice.gni") + typescript_sources = [ "lib/.gitattributes", "lib/README.md", @@ -116,7 +119,14 @@ typescript_sources = [ "lib/zh-tw/diagnosticMessages.generated.json", ] -action("build_typescript") { +group("build_typescript") { + deps = [ + "//third_party/typescript:build_typescript_pack", + "//third_party/typescript:typescript_notice", + ] +} + +action("build_typescript_pack") { sources = typescript_sources script = "compile_typescript.py" args = [ @@ -125,3 +135,11 @@ action("build_typescript") { ] outputs = [ "${target_out_dir}/ohos-typescript-4.9.5-r4.tgz" ] } + +collect_notice("typescript_notice") { + license_file = "LICENSE" + module_source_dir = get_label_info(":${target_name}", "dir") + outputs = [ + "${sdk_notice_dir}/ets/build-tools/ets-loader/node_modules/typescript.txt", + ] +} diff --git a/README.OpenSource b/README.OpenSource index a03a7c8d59..4a941e007a 100644 --- a/README.OpenSource +++ b/README.OpenSource @@ -2,7 +2,7 @@ { "Name": "typescript", "License": "Apache-2.0", - "License File": "NOTICE", + "License File": "LICENSE", "Version Number": "4.9.5", "Owner": "lihong67@huawei.com", "Upstream URL": "https://github.com/Microsoft/TypeScript.git",