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/config/components/ets_frontend/es2abc_config.gni")
15import("//build/ohos.gni")
16import("//build/templates/abc/ohos_abc.gni")
17
18es2abc_gen_abc("gen_data_uri_utils_abc") {
19  src_js = rebase_path("data_uri_utils.js")
20  dst_file = rebase_path(target_out_dir + "/data_uri_utils.abc")
21  in_puts = [ "data_uri_utils.js" ]
22  out_puts = [ target_out_dir + "/data_uri_utils.abc" ]
23  extra_args = [ "--module" ]
24}
25
26gen_js_obj("data_uri_utils_js") {
27  input = "data_uri_utils.js"
28  output = target_out_dir + "/data_uri_utils.o"
29}
30
31gen_js_obj("data_uri_utils_abc") {
32  input = get_label_info(":gen_data_uri_utils_abc", "target_out_dir") +
33          "/data_uri_utils.abc"
34  output = target_out_dir + "/data_uri_utils_abc.o"
35  dep = ":gen_data_uri_utils_abc"
36}
37
38ohos_abc("datauriutils_napi") {
39  sources = [ "data_uri_utils.js" ]
40  output_name = "datauriutils"
41  install_images = [ "system" ]
42  module_install_dir = "etc/abc/ability"
43  subsystem_name = "ability"
44  part_name = "ability_runtime"
45}
46