• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//build/config/components/ets_frontend/ets2abc_config.gni")
16
17npm_path = "//prebuilts/build-tools/common/nodejs/current/bin/npm"
18
19action("gen_ui_plugins") {
20  script = "build_ui_plugins.py"
21  args = [
22    "--source_path",
23    rebase_path(get_path_info(".", "abspath")),
24    "--output_path",
25    rebase_path("$target_gen_dir"),
26    "--npm",
27    rebase_path(npm_path),
28    "--current_os",
29    "$current_os",
30    "--root_out_dir",
31    rebase_path(root_out_dir),
32  ]
33  outputs = [ "$target_gen_dir" ]
34}
35
36ohos_copy("ui_plugin") {
37  deps = [ ":gen_ui_plugins" ]
38  sources = [ rebase_path("$target_gen_dir") ]
39  outputs = [ target_out_dir + "/$target_name" ]
40  module_source_dir = target_out_dir + "/$target_name"
41  module_install_name = ""
42  subsystem_name = "developtools"
43  part_name = "ace_ets2bundle"
44}
45
46ohos_copy("ohos_ets_ui_plugins") {
47  deps = [ ":gen_ui_plugins" ]
48  sources = [ rebase_path("$target_gen_dir") ]
49  outputs = [ ohos_ets_ui_plugins_path ]
50  subsystem_name = "developtools"
51  part_name = "ace_ets2bundle"
52}