123b3eb3cSopenharmony_ci# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
223b3eb3cSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
323b3eb3cSopenharmony_ci# you may not use this file except in compliance with the License.
423b3eb3cSopenharmony_ci# You may obtain a copy of the License at
523b3eb3cSopenharmony_ci#
623b3eb3cSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
723b3eb3cSopenharmony_ci#
823b3eb3cSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
923b3eb3cSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1023b3eb3cSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1123b3eb3cSopenharmony_ci# See the License for the specific language governing permissions and
1223b3eb3cSopenharmony_ci# limitations under the License.
1323b3eb3cSopenharmony_ci
1423b3eb3cSopenharmony_ciimport("//build/ohos.gni")
1523b3eb3cSopenharmony_ciimport("//build/templates/abc/ohos_abc.gni")
1623b3eb3cSopenharmony_ciimport("//foundation/arkui/ace_engine/ace_config.gni")
1723b3eb3cSopenharmony_ciimport("//foundation/arkui/ace_engine/build/ace_ext.gni")
1823b3eb3cSopenharmony_ciimport("//foundation/arkui/ace_engine/build/ace_gen_obj.gni")
1923b3eb3cSopenharmony_ci
2023b3eb3cSopenharmony_ci# declarative frontend source
2123b3eb3cSopenharmony_citemplate("declarative_frontend") {
2223b3eb3cSopenharmony_ci  forward_variables_from(invoker, "*")
2323b3eb3cSopenharmony_ci  platform = invoker.platform
2423b3eb3cSopenharmony_ci
2523b3eb3cSopenharmony_ci  ohos_source_set(target_name) {
2623b3eb3cSopenharmony_ci    subsystem_name = ace_engine_subsystem
2723b3eb3cSopenharmony_ci    part_name = ace_engine_part
2823b3eb3cSopenharmony_ci    defines += invoker.defines
2923b3eb3cSopenharmony_ci    defines += [ "USE_ARK_ENGINE" ]
3023b3eb3cSopenharmony_ci    configs = [ "$ace_root:ace_config" ]
3123b3eb3cSopenharmony_ci
3223b3eb3cSopenharmony_ci    include_dirs =
3323b3eb3cSopenharmony_ci        [ "$ace_napi_frameworks/bridge/declarative_frontend/engine/jsi" ]
3423b3eb3cSopenharmony_ci    if (platform == "ohos_ng" || is_arkui_x) {
3523b3eb3cSopenharmony_ci      sources = [
3623b3eb3cSopenharmony_ci        "ng/declarative_frontend_ng.cpp",
3723b3eb3cSopenharmony_ci        "ng/frontend_delegate_declarative_ng.cpp",
3823b3eb3cSopenharmony_ci        "ng/page_router_manager.cpp",
3923b3eb3cSopenharmony_ci      ]
4023b3eb3cSopenharmony_ci    } else {
4123b3eb3cSopenharmony_ci      sources = [
4223b3eb3cSopenharmony_ci        "declarative_frontend.cpp",
4323b3eb3cSopenharmony_ci        "frontend_delegate_declarative.cpp",
4423b3eb3cSopenharmony_ci        "ng/page_router_manager.cpp",
4523b3eb3cSopenharmony_ci      ]
4623b3eb3cSopenharmony_ci    }
4723b3eb3cSopenharmony_ci
4823b3eb3cSopenharmony_ci    if (ace_engine_feature_enable_split_mode &&
4923b3eb3cSopenharmony_ci        defined(vendor_configs.ace_engine_advanced_split_mode_dirs)) {
5023b3eb3cSopenharmony_ci      include_dirs += vendor_configs.ace_engine_advanced_split_mode_dirs
5123b3eb3cSopenharmony_ci    }
5223b3eb3cSopenharmony_ci
5323b3eb3cSopenharmony_ci    if (ace_engine_feature_enable_split_mode &&
5423b3eb3cSopenharmony_ci        defined(vendor_configs.ace_engine_advanced_split_mode_bridge)) {
5523b3eb3cSopenharmony_ci      sources += vendor_configs.ace_engine_advanced_split_mode_bridge
5623b3eb3cSopenharmony_ci    } else {
5723b3eb3cSopenharmony_ci      sources += [ "ng/page_router_manager_factory.cpp" ]
5823b3eb3cSopenharmony_ci    }
5923b3eb3cSopenharmony_ci
6023b3eb3cSopenharmony_ci    deps = [ "$ace_root/frameworks/core/components/theme:build_theme_code" ]
6123b3eb3cSopenharmony_ci    if (is_arkui_x) {
6223b3eb3cSopenharmony_ci      deps += [
6323b3eb3cSopenharmony_ci        "//arkcompiler/ets_runtime:libark_jsruntime_static",
6423b3eb3cSopenharmony_ci        "//foundation/arkui/napi:ace_napi",
6523b3eb3cSopenharmony_ci      ]
6623b3eb3cSopenharmony_ci    }
6723b3eb3cSopenharmony_ci    external_deps = [
6823b3eb3cSopenharmony_ci      "ets_runtime:libark_jsruntime",
6923b3eb3cSopenharmony_ci      "napi:ace_napi",
7023b3eb3cSopenharmony_ci    ]
7123b3eb3cSopenharmony_ci    if (use_hilog) {
7223b3eb3cSopenharmony_ci      external_deps += [ "hilog:libhilog" ]
7323b3eb3cSopenharmony_ci    }
7423b3eb3cSopenharmony_ci  }
7523b3eb3cSopenharmony_ci}
7623b3eb3cSopenharmony_ci
7723b3eb3cSopenharmony_ciforeach(item, ace_platforms) {
7823b3eb3cSopenharmony_ci  platform = item.name
7923b3eb3cSopenharmony_ci  declarative_frontend("declarative_frontend_" + item.name) {
8023b3eb3cSopenharmony_ci    defines = []
8123b3eb3cSopenharmony_ci    config = {
8223b3eb3cSopenharmony_ci    }
8323b3eb3cSopenharmony_ci
8423b3eb3cSopenharmony_ci    if (defined(item.config)) {
8523b3eb3cSopenharmony_ci      config = item.config
8623b3eb3cSopenharmony_ci    }
8723b3eb3cSopenharmony_ci
8823b3eb3cSopenharmony_ci    if (defined(config.defines)) {
8923b3eb3cSopenharmony_ci      defines = config.defines
9023b3eb3cSopenharmony_ci    }
9123b3eb3cSopenharmony_ci  }
9223b3eb3cSopenharmony_ci}
9323b3eb3cSopenharmony_ci
9423b3eb3cSopenharmony_ci# js resources objects
9523b3eb3cSopenharmony_cibase_output_path = get_label_info(":gen_js_proxyclass", "target_out_dir")
9623b3eb3cSopenharmony_cijsproxyclass_obj_path = base_output_path + "/js_proxy_class.o"
9723b3eb3cSopenharmony_cijsenumstyle_obj_path = base_output_path + "/js_enum_style.o"
9823b3eb3cSopenharmony_cijsmocksystemplugin_obj_path = base_output_path + "/js_mock_system_plugin.o"
9923b3eb3cSopenharmony_ciark_theme_obj_path = base_output_path + "/arkTheme.o"
10023b3eb3cSopenharmony_cijsuicontext_obj_path = base_output_path + "/jsUIContext.o"
10123b3eb3cSopenharmony_ciarkcomponent_obj_path = base_output_path + "/arkComponent.o"
10223b3eb3cSopenharmony_ci
10323b3eb3cSopenharmony_cigen_obj("js_proxyclass") {
10423b3eb3cSopenharmony_ci  input = "engine/stateMgmt.js"
10523b3eb3cSopenharmony_ci  if (use_mac || use_mingw_win || use_linux || target_os == "ios") {
10623b3eb3cSopenharmony_ci    jsproxyclass_obj_path = base_output_path + "/js_proxy_class.c"
10723b3eb3cSopenharmony_ci  }
10823b3eb3cSopenharmony_ci  output = jsproxyclass_obj_path
10923b3eb3cSopenharmony_ci  snapshot_dep = []
11023b3eb3cSopenharmony_ci}
11123b3eb3cSopenharmony_ci
11223b3eb3cSopenharmony_cigen_obj("js_enum_style") {
11323b3eb3cSopenharmony_ci  input = "engine/jsEnumStyle.js"
11423b3eb3cSopenharmony_ci  if (use_mac || use_mingw_win || use_linux || target_os == "ios") {
11523b3eb3cSopenharmony_ci    jsenumstyle_obj_path = base_output_path + "/js_enum_style.c"
11623b3eb3cSopenharmony_ci  }
11723b3eb3cSopenharmony_ci  output = jsenumstyle_obj_path
11823b3eb3cSopenharmony_ci  snapshot_dep = []
11923b3eb3cSopenharmony_ci}
12023b3eb3cSopenharmony_ci
12123b3eb3cSopenharmony_cigen_obj("ark_theme") {
12223b3eb3cSopenharmony_ci  input = "engine/arkTheme.js"
12323b3eb3cSopenharmony_ci  if (use_mac || use_mingw_win || use_linux || target_os == "ios") {
12423b3eb3cSopenharmony_ci    ark_theme_obj_path = base_output_path + "/ark_theme.c"
12523b3eb3cSopenharmony_ci  }
12623b3eb3cSopenharmony_ci  output = ark_theme_obj_path
12723b3eb3cSopenharmony_ci  snapshot_dep = []
12823b3eb3cSopenharmony_ci}
12923b3eb3cSopenharmony_ci
13023b3eb3cSopenharmony_cigen_obj("ark_component") {
13123b3eb3cSopenharmony_ci  input = "engine/arkComponent.js"
13223b3eb3cSopenharmony_ci  if (use_mac || use_mingw_win || use_linux || target_os == "ios") {
13323b3eb3cSopenharmony_ci    arkcomponent_obj_path = base_output_path + "/ark_component.c"
13423b3eb3cSopenharmony_ci  }
13523b3eb3cSopenharmony_ci  output = arkcomponent_obj_path
13623b3eb3cSopenharmony_ci  snapshot_dep = []
13723b3eb3cSopenharmony_ci}
13823b3eb3cSopenharmony_ci
13923b3eb3cSopenharmony_ciif (!is_arkui_x && (use_mac || use_mingw_win || use_linux)) {
14023b3eb3cSopenharmony_ci  gen_obj("js_mock_system_plugin") {
14123b3eb3cSopenharmony_ci    input = "$root_out_dir/obj/ide/tools/previewer/automock/dist/jsMockSystemPlugin.js"
14223b3eb3cSopenharmony_ci    if (use_mac || use_mingw_win || use_linux || target_os == "ios") {
14323b3eb3cSopenharmony_ci      jsmocksystemplugin_obj_path =
14423b3eb3cSopenharmony_ci          base_output_path + "/js_mock_system_plugin.c"
14523b3eb3cSopenharmony_ci    }
14623b3eb3cSopenharmony_ci    output = jsmocksystemplugin_obj_path
14723b3eb3cSopenharmony_ci    snapshot_dep = [ "//ide/tools/previewer/automock:gen_snapshot_jsmock" ]
14823b3eb3cSopenharmony_ci  }
14923b3eb3cSopenharmony_ci}
15023b3eb3cSopenharmony_ci
15123b3eb3cSopenharmony_cigen_obj("js_uicontext") {
15223b3eb3cSopenharmony_ci  input = "engine/jsUIContext.js"
15323b3eb3cSopenharmony_ci  if (use_mac || use_mingw_win || use_linux || target_os == "ios") {
15423b3eb3cSopenharmony_ci    jsuicontext_obj_path = base_output_path + "/jsUIContext.c"
15523b3eb3cSopenharmony_ci  }
15623b3eb3cSopenharmony_ci  output = jsuicontext_obj_path
15723b3eb3cSopenharmony_ci  snapshot_dep = []
15823b3eb3cSopenharmony_ci}
15923b3eb3cSopenharmony_ci
16023b3eb3cSopenharmony_ci# build declarative javascript engine source
16123b3eb3cSopenharmony_citemplate("declarative_js_engine") {
16223b3eb3cSopenharmony_ci  forward_variables_from(invoker, "*")
16323b3eb3cSopenharmony_ci
16423b3eb3cSopenharmony_ci  ohos_source_set(target_name) {
16523b3eb3cSopenharmony_ci    subsystem_name = ace_engine_subsystem
16623b3eb3cSopenharmony_ci    part_name = ace_engine_part
16723b3eb3cSopenharmony_ci    defines += invoker.defines
16823b3eb3cSopenharmony_ci    if (target_cpu == "arm64") {
16923b3eb3cSopenharmony_ci      if (!is_mingw) {
17023b3eb3cSopenharmony_ci        defines += [ "_ARM64_" ]
17123b3eb3cSopenharmony_ci      }
17223b3eb3cSopenharmony_ci    }
17323b3eb3cSopenharmony_ci    if (current_os == "ohos" && current_cpu == "x86_64") {
17423b3eb3cSopenharmony_ci      defines += [ "SIMULATOR_64" ]
17523b3eb3cSopenharmony_ci    }
17623b3eb3cSopenharmony_ci
17723b3eb3cSopenharmony_ci    deps = [
17823b3eb3cSopenharmony_ci      ":ark_modifier",
17923b3eb3cSopenharmony_ci      ":ark_theme_control",
18023b3eb3cSopenharmony_ci      ":gen_obj_src_ark_component",
18123b3eb3cSopenharmony_ci      ":gen_obj_src_ark_theme",
18223b3eb3cSopenharmony_ci      ":gen_obj_src_js_enum_style",
18323b3eb3cSopenharmony_ci      ":gen_obj_src_js_proxyclass",
18423b3eb3cSopenharmony_ci      ":mock",
18523b3eb3cSopenharmony_ci      ":prefetcher",
18623b3eb3cSopenharmony_ci      ":shape",
18723b3eb3cSopenharmony_ci      ":statemanagement",
18823b3eb3cSopenharmony_ci      ":x_node",
18923b3eb3cSopenharmony_ci      "engine/$engine_path:declarative_js_engine_bridge_${engine_name}_$platform",
19023b3eb3cSopenharmony_ci    ]
19123b3eb3cSopenharmony_ci
19223b3eb3cSopenharmony_ci    if (!is_arkui_x) {
19323b3eb3cSopenharmony_ci      deps += [ ":uicontext" ]
19423b3eb3cSopenharmony_ci    } else {
19523b3eb3cSopenharmony_ci      deps += [ ":gen_obj_src_js_uicontext" ]
19623b3eb3cSopenharmony_ci    }
19723b3eb3cSopenharmony_ci
19823b3eb3cSopenharmony_ci    configs = [ "$ace_root:ace_config" ]
19923b3eb3cSopenharmony_ci    if (ace_engine_feature_enable_point_light) {
20023b3eb3cSopenharmony_ci      defines += [ "POINT_LIGHT_ENABLE" ]
20123b3eb3cSopenharmony_ci    }
20223b3eb3cSopenharmony_ci
20323b3eb3cSopenharmony_ci    sources = [
20423b3eb3cSopenharmony_ci      "engine/bindings_implementation.cpp",
20523b3eb3cSopenharmony_ci      "engine/declarative_engine_loader.cpp",
20623b3eb3cSopenharmony_ci      "engine/functions/js_animator_function.cpp",
20723b3eb3cSopenharmony_ci      "engine/functions/js_click_function.cpp",
20823b3eb3cSopenharmony_ci      "engine/functions/js_clipboard_function.cpp",
20923b3eb3cSopenharmony_ci      "engine/functions/js_drag_function.cpp",
21023b3eb3cSopenharmony_ci      "engine/functions/js_focus_function.cpp",
21123b3eb3cSopenharmony_ci      "engine/functions/js_foreach_function.cpp",
21223b3eb3cSopenharmony_ci      "engine/functions/js_function.cpp",
21323b3eb3cSopenharmony_ci      "engine/functions/js_gesture_function.cpp",
21423b3eb3cSopenharmony_ci      "engine/functions/js_gesture_judge_function.cpp",
21523b3eb3cSopenharmony_ci      "engine/functions/js_hover_function.cpp",
21623b3eb3cSopenharmony_ci      "engine/functions/js_key_function.cpp",
21723b3eb3cSopenharmony_ci      "engine/functions/js_mouse_function.cpp",
21823b3eb3cSopenharmony_ci      "engine/functions/js_navigation_function.cpp",
21923b3eb3cSopenharmony_ci      "engine/functions/js_on_area_change_function.cpp",
22023b3eb3cSopenharmony_ci      "engine/functions/js_on_child_touch_test_function.cpp",
22123b3eb3cSopenharmony_ci      "engine/functions/js_on_size_change_function.cpp",
22223b3eb3cSopenharmony_ci      "engine/functions/js_page_transition_function.cpp",
22323b3eb3cSopenharmony_ci      "engine/functions/js_pan_function.cpp",
22423b3eb3cSopenharmony_ci      "engine/functions/js_should_built_in_recognizer_parallel_with_function.cpp",
22523b3eb3cSopenharmony_ci      "engine/functions/js_swiper_function.cpp",
22623b3eb3cSopenharmony_ci      "engine/functions/js_tabs_function.cpp",
22723b3eb3cSopenharmony_ci      "engine/functions/js_touch_function.cpp",
22823b3eb3cSopenharmony_ci      "engine/functions/js_touch_intercept_function.cpp",
22923b3eb3cSopenharmony_ci      "engine/functions/js_webview_function.cpp",
23023b3eb3cSopenharmony_ci      "engine/js_types.cpp",
23123b3eb3cSopenharmony_ci      "interfaces/profiler/js_profiler.cpp",
23223b3eb3cSopenharmony_ci      "jsview/action_sheet/js_action_sheet.cpp",
23323b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas.cpp",
23423b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas_gradient.cpp",
23523b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas_image_data.cpp",
23623b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas_path.cpp",
23723b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas_pattern.cpp",
23823b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas_renderer.cpp",
23923b3eb3cSopenharmony_ci      "jsview/canvas/js_drawing_rendering_context.cpp",
24023b3eb3cSopenharmony_ci      "jsview/canvas/js_matrix2d.cpp",
24123b3eb3cSopenharmony_ci      "jsview/canvas/js_offscreen_canvas.cpp",
24223b3eb3cSopenharmony_ci      "jsview/canvas/js_offscreen_rendering_context.cpp",
24323b3eb3cSopenharmony_ci      "jsview/canvas/js_path2d.cpp",
24423b3eb3cSopenharmony_ci      "jsview/canvas/js_render_image.cpp",
24523b3eb3cSopenharmony_ci      "jsview/canvas/js_rendering_context.cpp",
24623b3eb3cSopenharmony_ci      "jsview/canvas/js_rendering_context_settings.cpp",
24723b3eb3cSopenharmony_ci      "jsview/dialog/js_alert_dialog.cpp",
24823b3eb3cSopenharmony_ci      "jsview/dialog/js_custom_dialog_controller.cpp",
24923b3eb3cSopenharmony_ci      "jsview/js_animator.cpp",
25023b3eb3cSopenharmony_ci      "jsview/js_badge.cpp",
25123b3eb3cSopenharmony_ci      "jsview/js_base_node.cpp",
25223b3eb3cSopenharmony_ci      "jsview/js_blank.cpp",
25323b3eb3cSopenharmony_ci      "jsview/js_button.cpp",
25423b3eb3cSopenharmony_ci      "jsview/js_calendar.cpp",
25523b3eb3cSopenharmony_ci      "jsview/js_calendar_controller.cpp",
25623b3eb3cSopenharmony_ci      "jsview/js_calendar_picker.cpp",
25723b3eb3cSopenharmony_ci      "jsview/js_checkbox.cpp",
25823b3eb3cSopenharmony_ci      "jsview/js_checkboxgroup.cpp",
25923b3eb3cSopenharmony_ci      "jsview/js_circle.cpp",
26023b3eb3cSopenharmony_ci      "jsview/js_circle_shape.cpp",
26123b3eb3cSopenharmony_ci      "jsview/js_clipboard.cpp",
26223b3eb3cSopenharmony_ci      "jsview/js_column.cpp",
26323b3eb3cSopenharmony_ci      "jsview/js_column_split.cpp",
26423b3eb3cSopenharmony_ci      "jsview/js_common_view.cpp",
26523b3eb3cSopenharmony_ci      "jsview/js_container_base.cpp",
26623b3eb3cSopenharmony_ci      "jsview/js_container_span.cpp",
26723b3eb3cSopenharmony_ci      "jsview/js_content_slot.cpp",
26823b3eb3cSopenharmony_ci      "jsview/js_counter.cpp",
26923b3eb3cSopenharmony_ci      "jsview/js_data_panel.cpp",
27023b3eb3cSopenharmony_ci      "jsview/js_datepicker.cpp",
27123b3eb3cSopenharmony_ci      "jsview/js_divider.cpp",
27223b3eb3cSopenharmony_ci      "jsview/js_dump_log.cpp",
27323b3eb3cSopenharmony_ci      "jsview/js_ellipse.cpp",
27423b3eb3cSopenharmony_ci      "jsview/js_ellipse_shape.cpp",
27523b3eb3cSopenharmony_ci      "jsview/js_environment.cpp",
27623b3eb3cSopenharmony_ci      "jsview/js_flex.cpp",
27723b3eb3cSopenharmony_ci      "jsview/js_flex_impl.cpp",
27823b3eb3cSopenharmony_ci      "jsview/js_folder_stack.cpp",
27923b3eb3cSopenharmony_ci      "jsview/js_foreach.cpp",
28023b3eb3cSopenharmony_ci      "jsview/js_form_link.cpp",
28123b3eb3cSopenharmony_ci      "jsview/js_gauge.cpp",
28223b3eb3cSopenharmony_ci      "jsview/js_gesture.cpp",
28323b3eb3cSopenharmony_ci      "jsview/js_grid.cpp",
28423b3eb3cSopenharmony_ci      "jsview/js_grid_col.cpp",
28523b3eb3cSopenharmony_ci      "jsview/js_grid_container.cpp",
28623b3eb3cSopenharmony_ci      "jsview/js_grid_item.cpp",
28723b3eb3cSopenharmony_ci      "jsview/js_grid_row.cpp",
28823b3eb3cSopenharmony_ci      "jsview/js_hyperlink.cpp",
28923b3eb3cSopenharmony_ci      "jsview/js_if_else.cpp",
29023b3eb3cSopenharmony_ci      "jsview/js_image.cpp",
29123b3eb3cSopenharmony_ci      "jsview/js_image_animator.cpp",
29223b3eb3cSopenharmony_ci      "jsview/js_image_span.cpp",
29323b3eb3cSopenharmony_ci      "jsview/js_indexer.cpp",
29423b3eb3cSopenharmony_ci      "jsview/js_indicator.cpp",
29523b3eb3cSopenharmony_ci      "jsview/js_interactable_view.cpp",
29623b3eb3cSopenharmony_ci      "jsview/js_keyboard_avoid.cpp",
29723b3eb3cSopenharmony_ci      "jsview/js_layout_manager.cpp",
29823b3eb3cSopenharmony_ci      "jsview/js_lazy_foreach.cpp",
29923b3eb3cSopenharmony_ci      "jsview/js_line.cpp",
30023b3eb3cSopenharmony_ci      "jsview/js_linear_gradient.cpp",
30123b3eb3cSopenharmony_ci      "jsview/js_linear_indicator.cpp",
30223b3eb3cSopenharmony_ci      "jsview/js_linear_indicator_controller.cpp",
30323b3eb3cSopenharmony_ci      "jsview/js_list.cpp",
30423b3eb3cSopenharmony_ci      "jsview/js_list_item.cpp",
30523b3eb3cSopenharmony_ci      "jsview/js_list_item_group.cpp",
30623b3eb3cSopenharmony_ci      "jsview/js_loading_progress.cpp",
30723b3eb3cSopenharmony_ci      "jsview/js_local_storage.cpp",
30823b3eb3cSopenharmony_ci      "jsview/js_location_button.cpp",
30923b3eb3cSopenharmony_ci      "jsview/js_marquee.cpp",
31023b3eb3cSopenharmony_ci      "jsview/js_menu.cpp",
31123b3eb3cSopenharmony_ci      "jsview/js_menu_item.cpp",
31223b3eb3cSopenharmony_ci      "jsview/js_menu_item_group.cpp",
31323b3eb3cSopenharmony_ci      "jsview/js_mock.cpp",
31423b3eb3cSopenharmony_ci      "jsview/js_nav_path_stack.cpp",
31523b3eb3cSopenharmony_ci      "jsview/js_navdestination.cpp",
31623b3eb3cSopenharmony_ci      "jsview/js_navdestination_context.cpp",
31723b3eb3cSopenharmony_ci      "jsview/js_navigation.cpp",
31823b3eb3cSopenharmony_ci      "jsview/js_navigation_stack.cpp",
31923b3eb3cSopenharmony_ci      "jsview/js_navigation_utils.cpp",
32023b3eb3cSopenharmony_ci      "jsview/js_navigator.cpp",
32123b3eb3cSopenharmony_ci      "jsview/js_navrouter.cpp",
32223b3eb3cSopenharmony_ci      "jsview/js_node_container.cpp",
32323b3eb3cSopenharmony_ci      "jsview/js_page_transition.cpp",
32423b3eb3cSopenharmony_ci      "jsview/js_pan_handler.cpp",
32523b3eb3cSopenharmony_ci      "jsview/js_particle.cpp",
32623b3eb3cSopenharmony_ci      "jsview/js_paste_button.cpp",
32723b3eb3cSopenharmony_ci      "jsview/js_path.cpp",
32823b3eb3cSopenharmony_ci      "jsview/js_path_shape.cpp",
32923b3eb3cSopenharmony_ci      "jsview/js_pattern_lock.cpp",
33023b3eb3cSopenharmony_ci      "jsview/js_persistent.cpp",
33123b3eb3cSopenharmony_ci      "jsview/js_polygon.cpp",
33223b3eb3cSopenharmony_ci      "jsview/js_polyline.cpp",
33323b3eb3cSopenharmony_ci      "jsview/js_progress.cpp",
33423b3eb3cSopenharmony_ci      "jsview/js_qrcode.cpp",
33523b3eb3cSopenharmony_ci      "jsview/js_radio.cpp",
33623b3eb3cSopenharmony_ci      "jsview/js_rect.cpp",
33723b3eb3cSopenharmony_ci      "jsview/js_rect_shape.cpp",
33823b3eb3cSopenharmony_ci      "jsview/js_recycle_view.cpp",
33923b3eb3cSopenharmony_ci      "jsview/js_refresh.cpp",
34023b3eb3cSopenharmony_ci      "jsview/js_relative_container.cpp",
34123b3eb3cSopenharmony_ci      "jsview/js_repeat.cpp",
34223b3eb3cSopenharmony_ci      "jsview/js_repeat_virtual_scroll.cpp",
34323b3eb3cSopenharmony_ci      "jsview/js_richeditor.cpp",
34423b3eb3cSopenharmony_ci      "jsview/js_row.cpp",
34523b3eb3cSopenharmony_ci      "jsview/js_row_split.cpp",
34623b3eb3cSopenharmony_ci      "jsview/js_save_button.cpp",
34723b3eb3cSopenharmony_ci      "jsview/js_scope_util.cpp",
34823b3eb3cSopenharmony_ci      "jsview/js_scroll.cpp",
34923b3eb3cSopenharmony_ci      "jsview/js_scrollable.cpp",
35023b3eb3cSopenharmony_ci      "jsview/js_scrollable_base.cpp",
35123b3eb3cSopenharmony_ci      "jsview/js_scroller.cpp",
35223b3eb3cSopenharmony_ci      "jsview/js_search.cpp",
35323b3eb3cSopenharmony_ci      "jsview/js_sec_button_base.cpp",
35423b3eb3cSopenharmony_ci      "jsview/js_select.cpp",
35523b3eb3cSopenharmony_ci      "jsview/js_shape.cpp",
35623b3eb3cSopenharmony_ci      "jsview/js_shape_abstract.cpp",
35723b3eb3cSopenharmony_ci      "jsview/js_sheet.cpp",
35823b3eb3cSopenharmony_ci      "jsview/js_side_bar.cpp",
35923b3eb3cSopenharmony_ci      "jsview/js_slider.cpp",
36023b3eb3cSopenharmony_ci      "jsview/js_sliding_panel.cpp",
36123b3eb3cSopenharmony_ci      "jsview/js_span.cpp",
36223b3eb3cSopenharmony_ci      "jsview/js_stack.cpp",
36323b3eb3cSopenharmony_ci      "jsview/js_state_mgmt_profiler.cpp",
36423b3eb3cSopenharmony_ci      "jsview/js_stepper.cpp",
36523b3eb3cSopenharmony_ci      "jsview/js_stepper_item.cpp",
36623b3eb3cSopenharmony_ci      "jsview/js_swiper.cpp",
36723b3eb3cSopenharmony_ci      "jsview/js_symbol.cpp",
36823b3eb3cSopenharmony_ci      "jsview/js_symbol_span.cpp",
36923b3eb3cSopenharmony_ci      "jsview/js_tab_content.cpp",
37023b3eb3cSopenharmony_ci      "jsview/js_tabs.cpp",
37123b3eb3cSopenharmony_ci      "jsview/js_tabs_controller.cpp",
37223b3eb3cSopenharmony_ci      "jsview/js_tabs_feature.cpp",
37323b3eb3cSopenharmony_ci      "jsview/js_text.cpp",
37423b3eb3cSopenharmony_ci      "jsview/js_text_clock.cpp",
37523b3eb3cSopenharmony_ci      "jsview/js_text_editable_controller.cpp",
37623b3eb3cSopenharmony_ci      "jsview/js_textarea.cpp",
37723b3eb3cSopenharmony_ci      "jsview/js_textfield.cpp",
37823b3eb3cSopenharmony_ci      "jsview/js_textinput.cpp",
37923b3eb3cSopenharmony_ci      "jsview/js_textpicker.cpp",
38023b3eb3cSopenharmony_ci      "jsview/js_texttimer.cpp",
38123b3eb3cSopenharmony_ci      "jsview/js_toggle.cpp",
38223b3eb3cSopenharmony_ci      "jsview/js_touch_handler.cpp",
38323b3eb3cSopenharmony_ci      "jsview/js_utils.cpp",
38423b3eb3cSopenharmony_ci      "jsview/js_view.cpp",
38523b3eb3cSopenharmony_ci      "jsview/js_view_abstract.cpp",
38623b3eb3cSopenharmony_ci      "jsview/js_view_context.cpp",
38723b3eb3cSopenharmony_ci      "jsview/js_view_functions.cpp",
38823b3eb3cSopenharmony_ci      "jsview/js_view_measure_layout.cpp",
38923b3eb3cSopenharmony_ci      "jsview/js_view_stack_processor.cpp",
39023b3eb3cSopenharmony_ci      "jsview/js_water_flow.cpp",
39123b3eb3cSopenharmony_ci      "jsview/js_water_flow_item.cpp",
39223b3eb3cSopenharmony_ci      "jsview/js_water_flow_sections.cpp",
39323b3eb3cSopenharmony_ci      "jsview/menu/js_context_menu.cpp",
39423b3eb3cSopenharmony_ci      "jsview/scroll_bar/js_scroll_bar.cpp",
39523b3eb3cSopenharmony_ci      "sharedata/js_share_data.cpp",
39623b3eb3cSopenharmony_ci      "style_string/js_span_object.cpp",
39723b3eb3cSopenharmony_ci      "style_string/js_span_string.cpp",
39823b3eb3cSopenharmony_ci      "view_stack_processor.cpp",
39923b3eb3cSopenharmony_ci
40023b3eb3cSopenharmony_ci      # ark_theme
40123b3eb3cSopenharmony_ci      "ark_theme/theme_apply/js_with_theme.cpp",
40223b3eb3cSopenharmony_ci
40323b3eb3cSopenharmony_ci      # Models implemenations for classic fw
40423b3eb3cSopenharmony_ci      "jsview/models/action_sheet_model_impl.cpp",
40523b3eb3cSopenharmony_ci      "jsview/models/alert_dialog_model_impl.cpp",
40623b3eb3cSopenharmony_ci      "jsview/models/animator_model_impl.cpp",
40723b3eb3cSopenharmony_ci      "jsview/models/badge_model_impl.cpp",
40823b3eb3cSopenharmony_ci      "jsview/models/blank_model_impl.cpp",
40923b3eb3cSopenharmony_ci      "jsview/models/button_model_impl.cpp",
41023b3eb3cSopenharmony_ci      "jsview/models/calendar_controller_model_impl.cpp",
41123b3eb3cSopenharmony_ci      "jsview/models/calendar_model_impl.cpp",
41223b3eb3cSopenharmony_ci      "jsview/models/canvas/canvas_model_impl.cpp",
41323b3eb3cSopenharmony_ci      "jsview/models/canvas/canvas_rendering_context_2d_model_impl.cpp",
41423b3eb3cSopenharmony_ci      "jsview/models/canvas/offscreen_canvas_rendering_context_2d_model_impl.cpp",
41523b3eb3cSopenharmony_ci      "jsview/models/checkbox_model_impl.cpp",
41623b3eb3cSopenharmony_ci      "jsview/models/checkboxgroup_model_impl.cpp",
41723b3eb3cSopenharmony_ci      "jsview/models/circle_model_impl.cpp",
41823b3eb3cSopenharmony_ci      "jsview/models/column_model_impl.cpp",
41923b3eb3cSopenharmony_ci      "jsview/models/common_view_model_impl.cpp",
42023b3eb3cSopenharmony_ci      "jsview/models/counter_model_impl.cpp",
42123b3eb3cSopenharmony_ci      "jsview/models/custom_dialog_controller_model_impl.cpp",
42223b3eb3cSopenharmony_ci      "jsview/models/data_panel_model_impl.cpp",
42323b3eb3cSopenharmony_ci      "jsview/models/divider_model_impl.cpp",
42423b3eb3cSopenharmony_ci      "jsview/models/ellipse_model_impl.cpp",
42523b3eb3cSopenharmony_ci      "jsview/models/flex_model_impl.cpp",
42623b3eb3cSopenharmony_ci      "jsview/models/for_each_model_impl.cpp",
42723b3eb3cSopenharmony_ci      "jsview/models/gauge_model_impl.cpp",
42823b3eb3cSopenharmony_ci      "jsview/models/gesture_model_impl.cpp",
42923b3eb3cSopenharmony_ci      "jsview/models/grid_col_model_impl.cpp",
43023b3eb3cSopenharmony_ci      "jsview/models/grid_container_model_impl.cpp",
43123b3eb3cSopenharmony_ci      "jsview/models/grid_item_model_impl.cpp",
43223b3eb3cSopenharmony_ci      "jsview/models/grid_model_impl.cpp",
43323b3eb3cSopenharmony_ci      "jsview/models/grid_row_model_impl.cpp",
43423b3eb3cSopenharmony_ci      "jsview/models/hyperlink_model_impl.cpp",
43523b3eb3cSopenharmony_ci      "jsview/models/if_else_model_impl.cpp",
43623b3eb3cSopenharmony_ci      "jsview/models/image_animator_model_impl.cpp",
43723b3eb3cSopenharmony_ci      "jsview/models/image_model_impl.cpp",
43823b3eb3cSopenharmony_ci      "jsview/models/indexer_model_impl.cpp",
43923b3eb3cSopenharmony_ci      "jsview/models/lazy_for_each_model_impl.cpp",
44023b3eb3cSopenharmony_ci      "jsview/models/line_model_impl.cpp",
44123b3eb3cSopenharmony_ci      "jsview/models/linear_split_model_impl.cpp",
44223b3eb3cSopenharmony_ci      "jsview/models/list_item_group_model_impl.cpp",
44323b3eb3cSopenharmony_ci      "jsview/models/list_item_model_impl.cpp",
44423b3eb3cSopenharmony_ci      "jsview/models/list_model_impl.cpp",
44523b3eb3cSopenharmony_ci      "jsview/models/loading_progress_model_impl.cpp",
44623b3eb3cSopenharmony_ci      "jsview/models/marquee_model_impl.cpp",
44723b3eb3cSopenharmony_ci      "jsview/models/menu_item_model_impl.cpp",
44823b3eb3cSopenharmony_ci      "jsview/models/menu_model_impl.cpp",
44923b3eb3cSopenharmony_ci      "jsview/models/navigation_model_impl.cpp",
45023b3eb3cSopenharmony_ci      "jsview/models/navigator_model_impl.cpp",
45123b3eb3cSopenharmony_ci      "jsview/models/page_transition_model_impl.cpp",
45223b3eb3cSopenharmony_ci      "jsview/models/path_model_impl.cpp",
45323b3eb3cSopenharmony_ci      "jsview/models/patternlock_model_impl.cpp",
45423b3eb3cSopenharmony_ci      "jsview/models/picker_model_impl.cpp",
45523b3eb3cSopenharmony_ci      "jsview/models/polygon_model_impl.cpp",
45623b3eb3cSopenharmony_ci      "jsview/models/progress_model_impl.cpp",
45723b3eb3cSopenharmony_ci      "jsview/models/qrcode_model_impl.cpp",
45823b3eb3cSopenharmony_ci      "jsview/models/radio_model_impl.cpp",
45923b3eb3cSopenharmony_ci      "jsview/models/rect_model_impl.cpp",
46023b3eb3cSopenharmony_ci      "jsview/models/refresh_model_impl.cpp",
46123b3eb3cSopenharmony_ci      "jsview/models/relative_container_model_impl.cpp",
46223b3eb3cSopenharmony_ci      "jsview/models/richeditor_model_impl.cpp",
46323b3eb3cSopenharmony_ci      "jsview/models/row_model_impl.cpp",
46423b3eb3cSopenharmony_ci      "jsview/models/scroll_bar_model_impl.cpp",
46523b3eb3cSopenharmony_ci      "jsview/models/scroll_model_impl.cpp",
46623b3eb3cSopenharmony_ci      "jsview/models/search_model_impl.cpp",
46723b3eb3cSopenharmony_ci      "jsview/models/select_model_impl.cpp",
46823b3eb3cSopenharmony_ci      "jsview/models/shape_abstract_model_impl.cpp",
46923b3eb3cSopenharmony_ci      "jsview/models/shape_model_impl.cpp",
47023b3eb3cSopenharmony_ci      "jsview/models/side_bar_container_model_impl.cpp",
47123b3eb3cSopenharmony_ci      "jsview/models/slider_model_impl.cpp",
47223b3eb3cSopenharmony_ci      "jsview/models/sliding_panel_model_impl.cpp",
47323b3eb3cSopenharmony_ci      "jsview/models/span_model_impl.cpp",
47423b3eb3cSopenharmony_ci      "jsview/models/stack_model_impl.cpp",
47523b3eb3cSopenharmony_ci      "jsview/models/stepper_item_model_impl.cpp",
47623b3eb3cSopenharmony_ci      "jsview/models/stepper_model_impl.cpp",
47723b3eb3cSopenharmony_ci      "jsview/models/swiper_model_impl.cpp",
47823b3eb3cSopenharmony_ci      "jsview/models/tab_content_model_impl.cpp",
47923b3eb3cSopenharmony_ci      "jsview/models/tabs_model_impl.cpp",
48023b3eb3cSopenharmony_ci      "jsview/models/text_clock_model_impl.cpp",
48123b3eb3cSopenharmony_ci      "jsview/models/text_field_model_impl.cpp",
48223b3eb3cSopenharmony_ci      "jsview/models/text_model_impl.cpp",
48323b3eb3cSopenharmony_ci      "jsview/models/text_timer_model_impl.cpp",
48423b3eb3cSopenharmony_ci      "jsview/models/textpicker_model_impl.cpp",
48523b3eb3cSopenharmony_ci      "jsview/models/timepicker_model_impl.cpp",
48623b3eb3cSopenharmony_ci      "jsview/models/toggle_model_impl.cpp",
48723b3eb3cSopenharmony_ci      "jsview/models/view_abstract_model_impl.cpp",
48823b3eb3cSopenharmony_ci      "jsview/models/view_context_model_impl.cpp",
48923b3eb3cSopenharmony_ci      "jsview/models/view_full_update_model_impl.cpp",
49023b3eb3cSopenharmony_ci      "jsview/models/view_partial_update_model_impl.cpp",
49123b3eb3cSopenharmony_ci      "jsview/models/water_flow_item_model_impl.cpp",
49223b3eb3cSopenharmony_ci      "jsview/models/water_flow_model_impl.cpp",
49323b3eb3cSopenharmony_ci    ]
49423b3eb3cSopenharmony_ci
49523b3eb3cSopenharmony_ci    external_deps = [ "graphic_2d:drawing_napi_impl" ]
49623b3eb3cSopenharmony_ci    if (use_hilog) {
49723b3eb3cSopenharmony_ci      external_deps += [ "hilog:libhilog" ]
49823b3eb3cSopenharmony_ci    }
49923b3eb3cSopenharmony_ci    if (defined(config.enable_drag_framework) && config.enable_drag_framework &&
50023b3eb3cSopenharmony_ci        defined(global_parts_info.distributeddatamgr_udmf)) {
50123b3eb3cSopenharmony_ci      external_deps += [
50223b3eb3cSopenharmony_ci        "udmf:udmf_client",
50323b3eb3cSopenharmony_ci        "udmf:udmf_data_napi",
50423b3eb3cSopenharmony_ci      ]
50523b3eb3cSopenharmony_ci    }
50623b3eb3cSopenharmony_ci
50723b3eb3cSopenharmony_ci    # rich components needed by phone and TV. wearable like watch do not need them
50823b3eb3cSopenharmony_ci    if (defined(config.rich_components_support) &&
50923b3eb3cSopenharmony_ci        config.rich_components_support) {
51023b3eb3cSopenharmony_ci      sources += [
51123b3eb3cSopenharmony_ci        "jsview/js_camera.cpp",
51223b3eb3cSopenharmony_ci        "jsview/js_piece.cpp",
51323b3eb3cSopenharmony_ci        "jsview/js_rating.cpp",
51423b3eb3cSopenharmony_ci        "jsview/models/rating_model_impl.cpp",
51523b3eb3cSopenharmony_ci      ]
51623b3eb3cSopenharmony_ci      if (defined(config.video_components_support) &&
51723b3eb3cSopenharmony_ci          config.video_components_support) {
51823b3eb3cSopenharmony_ci        sources += [
51923b3eb3cSopenharmony_ci          "jsview/js_video.cpp",
52023b3eb3cSopenharmony_ci          "jsview/js_video_controller.cpp",
52123b3eb3cSopenharmony_ci          "jsview/models/video_model_impl.cpp",
52223b3eb3cSopenharmony_ci        ]
52323b3eb3cSopenharmony_ci      }
52423b3eb3cSopenharmony_ci      if (defined(config.video_support_jsstack) &&
52523b3eb3cSopenharmony_ci          config.video_support_jsstack) {
52623b3eb3cSopenharmony_ci        external_deps += [ "hiview:libxpower_event_js" ]
52723b3eb3cSopenharmony_ci      }
52823b3eb3cSopenharmony_ci    }
52923b3eb3cSopenharmony_ci
53023b3eb3cSopenharmony_ci    include_dirs = []
53123b3eb3cSopenharmony_ci    if (defined(vendor_configs.ace_engine_advanced)) {
53223b3eb3cSopenharmony_ci      include_dirs += vendor_configs.ace_advance_dirs
53323b3eb3cSopenharmony_ci      sources += vendor_configs.ace_engine_advanced_jsview
53423b3eb3cSopenharmony_ci    } else {
53523b3eb3cSopenharmony_ci      sources += [ "jsview/js_cached_image.cpp" ]
53623b3eb3cSopenharmony_ci    }
53723b3eb3cSopenharmony_ci
53823b3eb3cSopenharmony_ci    if (defined(config.xcomponent_components_support) &&
53923b3eb3cSopenharmony_ci        config.xcomponent_components_support) {
54023b3eb3cSopenharmony_ci      sources += [
54123b3eb3cSopenharmony_ci        "jsview/js_xcomponent.cpp",
54223b3eb3cSopenharmony_ci        "jsview/js_xcomponent_controller.cpp",
54323b3eb3cSopenharmony_ci        "jsview/models/xcomponent_model_impl.cpp",
54423b3eb3cSopenharmony_ci      ]
54523b3eb3cSopenharmony_ci    }
54623b3eb3cSopenharmony_ci
54723b3eb3cSopenharmony_ci    if (defined(config.enable_ability_component) &&
54823b3eb3cSopenharmony_ci        config.enable_ability_component) {
54923b3eb3cSopenharmony_ci      sources += [
55023b3eb3cSopenharmony_ci        "jsview/js_ability_component.cpp",
55123b3eb3cSopenharmony_ci        "jsview/js_ability_component_controller.cpp",
55223b3eb3cSopenharmony_ci        "jsview/models/ability_component_model_impl.cpp",
55323b3eb3cSopenharmony_ci      ]
55423b3eb3cSopenharmony_ci
55523b3eb3cSopenharmony_ci      external_deps += [
55623b3eb3cSopenharmony_ci        "input:libmmi-client",
55723b3eb3cSopenharmony_ci        "window_manager:scene_session",
55823b3eb3cSopenharmony_ci      ]
55923b3eb3cSopenharmony_ci    }
56023b3eb3cSopenharmony_ci
56123b3eb3cSopenharmony_ci    if (defined(config.web_components_support) &&
56223b3eb3cSopenharmony_ci        config.web_components_support) {
56323b3eb3cSopenharmony_ci      if (is_arkui_x) {
56423b3eb3cSopenharmony_ci        sources += [
56523b3eb3cSopenharmony_ci          "jsview/js_web.cpp",
56623b3eb3cSopenharmony_ci          "jsview/models/web_model_impl.cpp",
56723b3eb3cSopenharmony_ci        ]
56823b3eb3cSopenharmony_ci      } else {
56923b3eb3cSopenharmony_ci        sources += [
57023b3eb3cSopenharmony_ci          "jsview/js_richtext.cpp",
57123b3eb3cSopenharmony_ci          "jsview/js_web.cpp",
57223b3eb3cSopenharmony_ci          "jsview/js_web_controller.cpp",
57323b3eb3cSopenharmony_ci          "jsview/models/richtext_model_impl.cpp",
57423b3eb3cSopenharmony_ci          "jsview/models/web_model_impl.cpp",
57523b3eb3cSopenharmony_ci        ]
57623b3eb3cSopenharmony_ci      }
57723b3eb3cSopenharmony_ci    }
57823b3eb3cSopenharmony_ci
57923b3eb3cSopenharmony_ci    if (defined(config.form_components_support) &&
58023b3eb3cSopenharmony_ci        config.form_components_support) {
58123b3eb3cSopenharmony_ci      sources += [
58223b3eb3cSopenharmony_ci        "jsview/js_form.cpp",
58323b3eb3cSopenharmony_ci        "jsview/js_form_menu_item.cpp",
58423b3eb3cSopenharmony_ci        "jsview/models/form_model_impl.cpp",
58523b3eb3cSopenharmony_ci      ]
58623b3eb3cSopenharmony_ci    }
58723b3eb3cSopenharmony_ci
58823b3eb3cSopenharmony_ci    if (defined(config.remote_window_support) && config.remote_window_support) {
58923b3eb3cSopenharmony_ci      sources += [
59023b3eb3cSopenharmony_ci        "jsview/js_remote_window.cpp",
59123b3eb3cSopenharmony_ci        "jsview/models/remote_window_model_impl.cpp",
59223b3eb3cSopenharmony_ci      ]
59323b3eb3cSopenharmony_ci    }
59423b3eb3cSopenharmony_ci
59523b3eb3cSopenharmony_ci    if (defined(config.effect_component_support) &&
59623b3eb3cSopenharmony_ci        config.effect_component_support) {
59723b3eb3cSopenharmony_ci      sources += [
59823b3eb3cSopenharmony_ci        "jsview/js_effect_component.cpp",
59923b3eb3cSopenharmony_ci        "jsview/models/effect_component_model_impl.cpp",
60023b3eb3cSopenharmony_ci      ]
60123b3eb3cSopenharmony_ci    }
60223b3eb3cSopenharmony_ci
60323b3eb3cSopenharmony_ci    if (defined(config.plugin_components_support) &&
60423b3eb3cSopenharmony_ci        config.plugin_components_support) {
60523b3eb3cSopenharmony_ci      sources += [
60623b3eb3cSopenharmony_ci        "jsview/js_plugin.cpp",
60723b3eb3cSopenharmony_ci        "jsview/models/plugin_model_impl.cpp",
60823b3eb3cSopenharmony_ci      ]
60923b3eb3cSopenharmony_ci    }
61023b3eb3cSopenharmony_ci
61123b3eb3cSopenharmony_ci    if (defined(config.preview_support) && config.preview_support) {
61223b3eb3cSopenharmony_ci      sources += [ "jsview/js_previewer_mock.cpp" ]
61323b3eb3cSopenharmony_ci    }
61423b3eb3cSopenharmony_ci
61523b3eb3cSopenharmony_ci    if (defined(config.model_component_support) &&
61623b3eb3cSopenharmony_ci        config.model_component_support) {
61723b3eb3cSopenharmony_ci      sources += [ "jsview/js_sceneview.cpp" ]
61823b3eb3cSopenharmony_ci      external_deps += [ "graphic_3d:3dWidgetAdapterInterface" ]
61923b3eb3cSopenharmony_ci    }
62023b3eb3cSopenharmony_ci
62123b3eb3cSopenharmony_ci    if (defined(config.use_build_in_js_engine) &&
62223b3eb3cSopenharmony_ci        config.use_build_in_js_engine) {
62323b3eb3cSopenharmony_ci      deps += [ "$ace_root/frameworks/bridge:framework_bridge_$platform" ]
62423b3eb3cSopenharmony_ci      defines += [ "BUILT_IN_JS_ENGINE" ]
62523b3eb3cSopenharmony_ci    } else {
62623b3eb3cSopenharmony_ci      sources += [
62723b3eb3cSopenharmony_ci        "$ace_root/frameworks/bridge/js_frontend/engine/common/js_engine.cpp",
62823b3eb3cSopenharmony_ci      ]
62923b3eb3cSopenharmony_ci      deps += [ "$ace_root/build:libace_compatible" ]
63023b3eb3cSopenharmony_ci      if (defined(config.build_container_scope_lib) &&
63123b3eb3cSopenharmony_ci          config.build_container_scope_lib) {
63223b3eb3cSopenharmony_ci        if (is_arkui_x) {
63323b3eb3cSopenharmony_ci          deps += [ "$ace_root/frameworks/core:ace_container_scope_static" ]
63423b3eb3cSopenharmony_ci        } else {
63523b3eb3cSopenharmony_ci          deps += [ "$ace_root/frameworks/core:ace_container_scope" ]
63623b3eb3cSopenharmony_ci        }
63723b3eb3cSopenharmony_ci      }
63823b3eb3cSopenharmony_ci    }
63923b3eb3cSopenharmony_ci
64023b3eb3cSopenharmony_ci    # add for cross_platfrom_build temporarily, shall be removed after external_deps is supported
64123b3eb3cSopenharmony_ci    if (is_arkui_x) {
64223b3eb3cSopenharmony_ci      configs += [ "$ark_ets_path:ark_jsruntime_public_config" ]
64323b3eb3cSopenharmony_ci      deps += [ "$ark_ets_path:libark_jsruntime_static" ]
64423b3eb3cSopenharmony_ci      if (defined(config.pixel_map_support) && config.pixel_map_support) {
64523b3eb3cSopenharmony_ci        configs += [ "//foundation/multimedia/image_framework/interfaces/innerkits:image_external_config" ]
64623b3eb3cSopenharmony_ci      }
64723b3eb3cSopenharmony_ci    } else {
64823b3eb3cSopenharmony_ci      external_deps += [
64923b3eb3cSopenharmony_ci        "ets_runtime:libark_jsruntime",
65023b3eb3cSopenharmony_ci        "napi:ace_napi",
65123b3eb3cSopenharmony_ci      ]
65223b3eb3cSopenharmony_ci    }
65323b3eb3cSopenharmony_ci
65423b3eb3cSopenharmony_ci    if (platform == "windows" || platform == "mac" || platform == "linux") {
65523b3eb3cSopenharmony_ci      deps += [ ":gen_obj_src_js_mock_system_plugin" ]
65623b3eb3cSopenharmony_ci    } else {
65723b3eb3cSopenharmony_ci      if (defined(config.plugin_components_support) &&
65823b3eb3cSopenharmony_ci          config.plugin_components_support) {
65923b3eb3cSopenharmony_ci        if (!use_mingw_win && !use_mac && !use_linux) {
66023b3eb3cSopenharmony_ci          external_deps += [
66123b3eb3cSopenharmony_ci            "image_framework:image",
66223b3eb3cSopenharmony_ci            "image_framework:image_native",
66323b3eb3cSopenharmony_ci          ]
66423b3eb3cSopenharmony_ci        }
66523b3eb3cSopenharmony_ci      } else {
66623b3eb3cSopenharmony_ci        external_deps += [
66723b3eb3cSopenharmony_ci          "image_framework:image",
66823b3eb3cSopenharmony_ci          "image_framework:image_native",
66923b3eb3cSopenharmony_ci        ]
67023b3eb3cSopenharmony_ci      }
67123b3eb3cSopenharmony_ci
67223b3eb3cSopenharmony_ci      if (defined(config.window_scene_support) && config.window_scene_support) {
67323b3eb3cSopenharmony_ci        sources += [
67423b3eb3cSopenharmony_ci          "jsview/js_embedded_component.cpp",
67523b3eb3cSopenharmony_ci          "jsview/js_security_ui_extension.cpp",
67623b3eb3cSopenharmony_ci          "jsview/js_ui_extension.cpp",
67723b3eb3cSopenharmony_ci          "jsview/window_scene/js_root_scene.cpp",
67823b3eb3cSopenharmony_ci          "jsview/window_scene/js_screen.cpp",
67923b3eb3cSopenharmony_ci          "jsview/window_scene/js_window_scene.cpp",
68023b3eb3cSopenharmony_ci        ]
68123b3eb3cSopenharmony_ci
68223b3eb3cSopenharmony_ci        if (defined(config.dynamic_component_support) &&
68323b3eb3cSopenharmony_ci            config.dynamic_component_support && !build_ohos_sdk) {
68423b3eb3cSopenharmony_ci          external_deps += [ "ets_utils:worker" ]
68523b3eb3cSopenharmony_ci          sources += [
68623b3eb3cSopenharmony_ci            "jsview/js_dynamic_component.cpp",
68723b3eb3cSopenharmony_ci            "jsview/js_isolated_component.cpp",
68823b3eb3cSopenharmony_ci          ]
68923b3eb3cSopenharmony_ci        }
69023b3eb3cSopenharmony_ci      }
69123b3eb3cSopenharmony_ci    }
69223b3eb3cSopenharmony_ci  }
69323b3eb3cSopenharmony_ci}
69423b3eb3cSopenharmony_ci
69523b3eb3cSopenharmony_ci# build ng declarative javascript engine source
69623b3eb3cSopenharmony_citemplate("declarative_js_engine_ng") {
69723b3eb3cSopenharmony_ci  forward_variables_from(invoker, "*")
69823b3eb3cSopenharmony_ci
69923b3eb3cSopenharmony_ci  ohos_source_set(target_name) {
70023b3eb3cSopenharmony_ci    subsystem_name = ace_engine_subsystem
70123b3eb3cSopenharmony_ci    part_name = ace_engine_part
70223b3eb3cSopenharmony_ci    defines += invoker.defines
70323b3eb3cSopenharmony_ci    if (target_cpu == "arm64") {
70423b3eb3cSopenharmony_ci      if (!is_mingw) {
70523b3eb3cSopenharmony_ci        defines += [ "_ARM64_" ]
70623b3eb3cSopenharmony_ci      }
70723b3eb3cSopenharmony_ci    }
70823b3eb3cSopenharmony_ci    if (current_os == "ohos" && current_cpu == "x86_64") {
70923b3eb3cSopenharmony_ci      defines += [ "SIMULATOR_64" ]
71023b3eb3cSopenharmony_ci    }
71123b3eb3cSopenharmony_ci
71223b3eb3cSopenharmony_ci    deps = [
71323b3eb3cSopenharmony_ci      ":ark_modifier",
71423b3eb3cSopenharmony_ci      ":ark_theme_control",
71523b3eb3cSopenharmony_ci      ":gen_obj_src_ark_component",
71623b3eb3cSopenharmony_ci      ":gen_obj_src_ark_theme",
71723b3eb3cSopenharmony_ci      ":gen_obj_src_js_enum_style",
71823b3eb3cSopenharmony_ci      ":gen_obj_src_js_proxyclass",
71923b3eb3cSopenharmony_ci      ":mock",
72023b3eb3cSopenharmony_ci      ":prefetcher",
72123b3eb3cSopenharmony_ci      ":shape",
72223b3eb3cSopenharmony_ci      ":statemanagement",
72323b3eb3cSopenharmony_ci      ":x_node",
72423b3eb3cSopenharmony_ci      "engine/$engine_path:declarative_js_engine_bridge_${engine_name}_$platform",
72523b3eb3cSopenharmony_ci    ]
72623b3eb3cSopenharmony_ci
72723b3eb3cSopenharmony_ci    if (!is_arkui_x) {
72823b3eb3cSopenharmony_ci      deps += [ ":uicontext" ]
72923b3eb3cSopenharmony_ci    } else {
73023b3eb3cSopenharmony_ci      deps += [ ":gen_obj_src_js_uicontext" ]
73123b3eb3cSopenharmony_ci    }
73223b3eb3cSopenharmony_ci
73323b3eb3cSopenharmony_ci    configs = [ "$ace_root:ace_config" ]
73423b3eb3cSopenharmony_ci
73523b3eb3cSopenharmony_ci    sources = [
73623b3eb3cSopenharmony_ci      "engine/bindings_implementation.cpp",
73723b3eb3cSopenharmony_ci      "engine/declarative_engine_loader.cpp",
73823b3eb3cSopenharmony_ci      "engine/functions/js_animator_function.cpp",
73923b3eb3cSopenharmony_ci      "engine/functions/js_click_function.cpp",
74023b3eb3cSopenharmony_ci      "engine/functions/js_clipboard_function.cpp",
74123b3eb3cSopenharmony_ci      "engine/functions/js_drag_function.cpp",
74223b3eb3cSopenharmony_ci      "engine/functions/js_focus_function.cpp",
74323b3eb3cSopenharmony_ci      "engine/functions/js_foreach_function.cpp",
74423b3eb3cSopenharmony_ci      "engine/functions/js_function.cpp",
74523b3eb3cSopenharmony_ci      "engine/functions/js_gesture_function.cpp",
74623b3eb3cSopenharmony_ci      "engine/functions/js_gesture_judge_function.cpp",
74723b3eb3cSopenharmony_ci      "engine/functions/js_hover_function.cpp",
74823b3eb3cSopenharmony_ci      "engine/functions/js_key_function.cpp",
74923b3eb3cSopenharmony_ci      "engine/functions/js_mouse_function.cpp",
75023b3eb3cSopenharmony_ci      "engine/functions/js_navigation_function.cpp",
75123b3eb3cSopenharmony_ci      "engine/functions/js_on_area_change_function.cpp",
75223b3eb3cSopenharmony_ci      "engine/functions/js_on_child_touch_test_function.cpp",
75323b3eb3cSopenharmony_ci      "engine/functions/js_on_size_change_function.cpp",
75423b3eb3cSopenharmony_ci      "engine/functions/js_page_transition_function.cpp",
75523b3eb3cSopenharmony_ci      "engine/functions/js_pan_function.cpp",
75623b3eb3cSopenharmony_ci      "engine/functions/js_should_built_in_recognizer_parallel_with_function.cpp",
75723b3eb3cSopenharmony_ci      "engine/functions/js_swiper_function.cpp",
75823b3eb3cSopenharmony_ci      "engine/functions/js_tabs_function.cpp",
75923b3eb3cSopenharmony_ci      "engine/functions/js_touch_function.cpp",
76023b3eb3cSopenharmony_ci      "engine/functions/js_touch_intercept_function.cpp",
76123b3eb3cSopenharmony_ci      "engine/functions/js_webview_function.cpp",
76223b3eb3cSopenharmony_ci      "engine/js_types.cpp",
76323b3eb3cSopenharmony_ci      "jsview/js_dump_log.cpp",
76423b3eb3cSopenharmony_ci      "jsview/js_environment.cpp",
76523b3eb3cSopenharmony_ci      "jsview/js_local_storage.cpp",
76623b3eb3cSopenharmony_ci      "jsview/js_persistent.cpp",
76723b3eb3cSopenharmony_ci      "jsview/js_state_mgmt_profiler.cpp",
76823b3eb3cSopenharmony_ci      "jsview/js_view_functions.cpp",
76923b3eb3cSopenharmony_ci      "jsview/js_view_measure_layout.cpp",
77023b3eb3cSopenharmony_ci      "jsview/js_view_stack_processor.cpp",
77123b3eb3cSopenharmony_ci      "sharedata/js_share_data.cpp",
77223b3eb3cSopenharmony_ci
77323b3eb3cSopenharmony_ci      # jsviews
77423b3eb3cSopenharmony_ci      "interfaces/profiler/js_profiler.cpp",
77523b3eb3cSopenharmony_ci      "jsview/action_sheet/js_action_sheet.cpp",
77623b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas.cpp",
77723b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas_gradient.cpp",
77823b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas_image_data.cpp",
77923b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas_path.cpp",
78023b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas_pattern.cpp",
78123b3eb3cSopenharmony_ci      "jsview/canvas/js_canvas_renderer.cpp",
78223b3eb3cSopenharmony_ci      "jsview/canvas/js_drawing_rendering_context.cpp",
78323b3eb3cSopenharmony_ci      "jsview/canvas/js_matrix2d.cpp",
78423b3eb3cSopenharmony_ci      "jsview/canvas/js_offscreen_canvas.cpp",
78523b3eb3cSopenharmony_ci      "jsview/canvas/js_offscreen_rendering_context.cpp",
78623b3eb3cSopenharmony_ci      "jsview/canvas/js_path2d.cpp",
78723b3eb3cSopenharmony_ci      "jsview/canvas/js_render_image.cpp",
78823b3eb3cSopenharmony_ci      "jsview/canvas/js_rendering_context.cpp",
78923b3eb3cSopenharmony_ci      "jsview/canvas/js_rendering_context_settings.cpp",
79023b3eb3cSopenharmony_ci      "jsview/dialog/js_alert_dialog.cpp",
79123b3eb3cSopenharmony_ci      "jsview/dialog/js_custom_dialog_controller.cpp",
79223b3eb3cSopenharmony_ci      "jsview/js_animator.cpp",
79323b3eb3cSopenharmony_ci      "jsview/js_badge.cpp",
79423b3eb3cSopenharmony_ci      "jsview/js_base_node.cpp",
79523b3eb3cSopenharmony_ci      "jsview/js_blank.cpp",
79623b3eb3cSopenharmony_ci      "jsview/js_button.cpp",
79723b3eb3cSopenharmony_ci      "jsview/js_calendar.cpp",
79823b3eb3cSopenharmony_ci      "jsview/js_calendar_controller.cpp",
79923b3eb3cSopenharmony_ci      "jsview/js_calendar_picker.cpp",
80023b3eb3cSopenharmony_ci      "jsview/js_checkbox.cpp",
80123b3eb3cSopenharmony_ci      "jsview/js_checkboxgroup.cpp",
80223b3eb3cSopenharmony_ci      "jsview/js_circle.cpp",
80323b3eb3cSopenharmony_ci      "jsview/js_circle_shape.cpp",
80423b3eb3cSopenharmony_ci      "jsview/js_clipboard.cpp",
80523b3eb3cSopenharmony_ci      "jsview/js_column.cpp",
80623b3eb3cSopenharmony_ci      "jsview/js_column_split.cpp",
80723b3eb3cSopenharmony_ci      "jsview/js_common_view.cpp",
80823b3eb3cSopenharmony_ci      "jsview/js_container_base.cpp",
80923b3eb3cSopenharmony_ci      "jsview/js_container_span.cpp",
81023b3eb3cSopenharmony_ci      "jsview/js_content_slot.cpp",
81123b3eb3cSopenharmony_ci      "jsview/js_counter.cpp",
81223b3eb3cSopenharmony_ci      "jsview/js_data_panel.cpp",
81323b3eb3cSopenharmony_ci      "jsview/js_datepicker.cpp",
81423b3eb3cSopenharmony_ci      "jsview/js_divider.cpp",
81523b3eb3cSopenharmony_ci      "jsview/js_ellipse.cpp",
81623b3eb3cSopenharmony_ci      "jsview/js_ellipse_shape.cpp",
81723b3eb3cSopenharmony_ci      "jsview/js_flex.cpp",
81823b3eb3cSopenharmony_ci      "jsview/js_flex_impl.cpp",
81923b3eb3cSopenharmony_ci      "jsview/js_folder_stack.cpp",
82023b3eb3cSopenharmony_ci      "jsview/js_foreach.cpp",
82123b3eb3cSopenharmony_ci      "jsview/js_form_link.cpp",
82223b3eb3cSopenharmony_ci      "jsview/js_gauge.cpp",
82323b3eb3cSopenharmony_ci      "jsview/js_gesture.cpp",
82423b3eb3cSopenharmony_ci      "jsview/js_grid.cpp",
82523b3eb3cSopenharmony_ci      "jsview/js_grid_col.cpp",
82623b3eb3cSopenharmony_ci      "jsview/js_grid_container.cpp",
82723b3eb3cSopenharmony_ci      "jsview/js_grid_item.cpp",
82823b3eb3cSopenharmony_ci      "jsview/js_grid_row.cpp",
82923b3eb3cSopenharmony_ci      "jsview/js_hyperlink.cpp",
83023b3eb3cSopenharmony_ci      "jsview/js_if_else.cpp",
83123b3eb3cSopenharmony_ci      "jsview/js_image.cpp",
83223b3eb3cSopenharmony_ci      "jsview/js_image_animator.cpp",
83323b3eb3cSopenharmony_ci      "jsview/js_image_span.cpp",
83423b3eb3cSopenharmony_ci      "jsview/js_indexer.cpp",
83523b3eb3cSopenharmony_ci      "jsview/js_indicator.cpp",
83623b3eb3cSopenharmony_ci      "jsview/js_interactable_view.cpp",
83723b3eb3cSopenharmony_ci      "jsview/js_keyboard_avoid.cpp",
83823b3eb3cSopenharmony_ci      "jsview/js_layout_manager.cpp",
83923b3eb3cSopenharmony_ci      "jsview/js_lazy_foreach.cpp",
84023b3eb3cSopenharmony_ci      "jsview/js_line.cpp",
84123b3eb3cSopenharmony_ci      "jsview/js_linear_gradient.cpp",
84223b3eb3cSopenharmony_ci      "jsview/js_linear_indicator.cpp",
84323b3eb3cSopenharmony_ci      "jsview/js_linear_indicator_controller.cpp",
84423b3eb3cSopenharmony_ci      "jsview/js_list.cpp",
84523b3eb3cSopenharmony_ci      "jsview/js_list_item.cpp",
84623b3eb3cSopenharmony_ci      "jsview/js_list_item_group.cpp",
84723b3eb3cSopenharmony_ci      "jsview/js_loading_progress.cpp",
84823b3eb3cSopenharmony_ci      "jsview/js_location_button.cpp",
84923b3eb3cSopenharmony_ci      "jsview/js_marquee.cpp",
85023b3eb3cSopenharmony_ci      "jsview/js_menu.cpp",
85123b3eb3cSopenharmony_ci      "jsview/js_menu_item.cpp",
85223b3eb3cSopenharmony_ci      "jsview/js_menu_item_group.cpp",
85323b3eb3cSopenharmony_ci      "jsview/js_mock.cpp",
85423b3eb3cSopenharmony_ci      "jsview/js_nav_path_stack.cpp",
85523b3eb3cSopenharmony_ci      "jsview/js_navdestination.cpp",
85623b3eb3cSopenharmony_ci      "jsview/js_navdestination_context.cpp",
85723b3eb3cSopenharmony_ci      "jsview/js_navigation.cpp",
85823b3eb3cSopenharmony_ci      "jsview/js_navigation_stack.cpp",
85923b3eb3cSopenharmony_ci      "jsview/js_navigation_utils.cpp",
86023b3eb3cSopenharmony_ci      "jsview/js_navigator.cpp",
86123b3eb3cSopenharmony_ci      "jsview/js_navrouter.cpp",
86223b3eb3cSopenharmony_ci      "jsview/js_node_container.cpp",
86323b3eb3cSopenharmony_ci      "jsview/js_page_transition.cpp",
86423b3eb3cSopenharmony_ci      "jsview/js_paste_button.cpp",
86523b3eb3cSopenharmony_ci      "jsview/js_path.cpp",
86623b3eb3cSopenharmony_ci      "jsview/js_path_shape.cpp",
86723b3eb3cSopenharmony_ci      "jsview/js_polygon.cpp",
86823b3eb3cSopenharmony_ci      "jsview/js_polyline.cpp",
86923b3eb3cSopenharmony_ci      "jsview/js_progress.cpp",
87023b3eb3cSopenharmony_ci      "jsview/js_radio.cpp",
87123b3eb3cSopenharmony_ci      "jsview/js_rating.cpp",
87223b3eb3cSopenharmony_ci      "jsview/js_rect.cpp",
87323b3eb3cSopenharmony_ci      "jsview/js_rect_shape.cpp",
87423b3eb3cSopenharmony_ci      "jsview/js_recycle_view.cpp",
87523b3eb3cSopenharmony_ci      "jsview/js_refresh.cpp",
87623b3eb3cSopenharmony_ci      "jsview/js_repeat.cpp",
87723b3eb3cSopenharmony_ci      "jsview/js_repeat_virtual_scroll.cpp",
87823b3eb3cSopenharmony_ci      "jsview/js_richeditor.cpp",
87923b3eb3cSopenharmony_ci      "jsview/js_row.cpp",
88023b3eb3cSopenharmony_ci      "jsview/js_row_split.cpp",
88123b3eb3cSopenharmony_ci      "jsview/js_save_button.cpp",
88223b3eb3cSopenharmony_ci      "jsview/js_scope_util.cpp",
88323b3eb3cSopenharmony_ci      "jsview/js_scroll.cpp",
88423b3eb3cSopenharmony_ci      "jsview/js_scrollable.cpp",
88523b3eb3cSopenharmony_ci      "jsview/js_scrollable_base.cpp",
88623b3eb3cSopenharmony_ci      "jsview/js_scroller.cpp",
88723b3eb3cSopenharmony_ci      "jsview/js_search.cpp",
88823b3eb3cSopenharmony_ci      "jsview/js_sec_button_base.cpp",
88923b3eb3cSopenharmony_ci      "jsview/js_select.cpp",
89023b3eb3cSopenharmony_ci      "jsview/js_shape.cpp",
89123b3eb3cSopenharmony_ci      "jsview/js_shape_abstract.cpp",
89223b3eb3cSopenharmony_ci      "jsview/js_side_bar.cpp",
89323b3eb3cSopenharmony_ci      "jsview/js_slider.cpp",
89423b3eb3cSopenharmony_ci      "jsview/js_sliding_panel.cpp",
89523b3eb3cSopenharmony_ci      "jsview/js_span.cpp",
89623b3eb3cSopenharmony_ci      "jsview/js_stack.cpp",
89723b3eb3cSopenharmony_ci      "jsview/js_stepper.cpp",
89823b3eb3cSopenharmony_ci      "jsview/js_stepper_item.cpp",
89923b3eb3cSopenharmony_ci      "jsview/js_swiper.cpp",
90023b3eb3cSopenharmony_ci      "jsview/js_symbol.cpp",
90123b3eb3cSopenharmony_ci      "jsview/js_symbol_span.cpp",
90223b3eb3cSopenharmony_ci      "jsview/js_tab_content.cpp",
90323b3eb3cSopenharmony_ci      "jsview/js_tabs.cpp",
90423b3eb3cSopenharmony_ci      "jsview/js_tabs_controller.cpp",
90523b3eb3cSopenharmony_ci      "jsview/js_tabs_feature.cpp",
90623b3eb3cSopenharmony_ci      "jsview/js_text.cpp",
90723b3eb3cSopenharmony_ci      "jsview/js_text_clock.cpp",
90823b3eb3cSopenharmony_ci      "jsview/js_text_editable_controller.cpp",
90923b3eb3cSopenharmony_ci      "jsview/js_textarea.cpp",
91023b3eb3cSopenharmony_ci      "jsview/js_textfield.cpp",
91123b3eb3cSopenharmony_ci      "jsview/js_textinput.cpp",
91223b3eb3cSopenharmony_ci      "jsview/js_textpicker.cpp",
91323b3eb3cSopenharmony_ci      "jsview/js_texttimer.cpp",
91423b3eb3cSopenharmony_ci      "jsview/js_toggle.cpp",
91523b3eb3cSopenharmony_ci      "jsview/js_utils.cpp",
91623b3eb3cSopenharmony_ci      "jsview/js_view.cpp",
91723b3eb3cSopenharmony_ci      "jsview/js_view_abstract.cpp",
91823b3eb3cSopenharmony_ci      "jsview/js_view_context.cpp",
91923b3eb3cSopenharmony_ci      "jsview/js_water_flow.cpp",
92023b3eb3cSopenharmony_ci      "jsview/js_water_flow_item.cpp",
92123b3eb3cSopenharmony_ci      "jsview/js_water_flow_sections.cpp",
92223b3eb3cSopenharmony_ci      "jsview/menu/js_context_menu.cpp",
92323b3eb3cSopenharmony_ci      "jsview/scroll_bar/js_scroll_bar.cpp",
92423b3eb3cSopenharmony_ci      "style_string/js_span_object.cpp",
92523b3eb3cSopenharmony_ci      "style_string/js_span_string.cpp",
92623b3eb3cSopenharmony_ci
92723b3eb3cSopenharmony_ci      # ark_theme
92823b3eb3cSopenharmony_ci      "ark_theme/theme_apply/js_with_theme.cpp",
92923b3eb3cSopenharmony_ci    ]
93023b3eb3cSopenharmony_ci
93123b3eb3cSopenharmony_ci    sources += [
93223b3eb3cSopenharmony_ci      "$ace_root/frameworks/bridge/js_frontend/engine/common/js_engine.cpp",
93323b3eb3cSopenharmony_ci    ]
93423b3eb3cSopenharmony_ci
93523b3eb3cSopenharmony_ci    external_deps = [ "graphic_2d:drawing_napi_impl" ]
93623b3eb3cSopenharmony_ci    if (use_hilog) {
93723b3eb3cSopenharmony_ci      external_deps += [ "hilog:libhilog" ]
93823b3eb3cSopenharmony_ci    }
93923b3eb3cSopenharmony_ci
94023b3eb3cSopenharmony_ci    if (!defined(config.use_components_lib) || !config.use_components_lib) {
94123b3eb3cSopenharmony_ci      sources += [
94223b3eb3cSopenharmony_ci        "jsview/js_pattern_lock.cpp",
94323b3eb3cSopenharmony_ci        "jsview/js_qrcode.cpp",
94423b3eb3cSopenharmony_ci        "jsview/js_relative_container.cpp",
94523b3eb3cSopenharmony_ci      ]
94623b3eb3cSopenharmony_ci    }
94723b3eb3cSopenharmony_ci
94823b3eb3cSopenharmony_ci    if (defined(config.video_components_support) &&
94923b3eb3cSopenharmony_ci        config.video_components_support) {
95023b3eb3cSopenharmony_ci      sources += [
95123b3eb3cSopenharmony_ci        "jsview/js_video.cpp",
95223b3eb3cSopenharmony_ci        "jsview/js_video_controller.cpp",
95323b3eb3cSopenharmony_ci      ]
95423b3eb3cSopenharmony_ci      if (defined(config.video_support_jsstack) &&
95523b3eb3cSopenharmony_ci          config.video_support_jsstack) {
95623b3eb3cSopenharmony_ci        external_deps += [ "hiview:libxpower_event_js" ]
95723b3eb3cSopenharmony_ci      }
95823b3eb3cSopenharmony_ci    }
95923b3eb3cSopenharmony_ci
96023b3eb3cSopenharmony_ci    if (defined(config.window_scene_support) && config.window_scene_support) {
96123b3eb3cSopenharmony_ci      sources += [
96223b3eb3cSopenharmony_ci        "jsview/js_embedded_component.cpp",
96323b3eb3cSopenharmony_ci        "jsview/js_security_ui_extension.cpp",
96423b3eb3cSopenharmony_ci        "jsview/js_ui_extension.cpp",
96523b3eb3cSopenharmony_ci        "jsview/window_scene/js_root_scene.cpp",
96623b3eb3cSopenharmony_ci        "jsview/window_scene/js_screen.cpp",
96723b3eb3cSopenharmony_ci        "jsview/window_scene/js_window_scene.cpp",
96823b3eb3cSopenharmony_ci      ]
96923b3eb3cSopenharmony_ci
97023b3eb3cSopenharmony_ci      if (defined(config.dynamic_component_support) &&
97123b3eb3cSopenharmony_ci          config.dynamic_component_support && !build_ohos_sdk) {
97223b3eb3cSopenharmony_ci        external_deps += [ "ets_utils:worker" ]
97323b3eb3cSopenharmony_ci
97423b3eb3cSopenharmony_ci        sources += [
97523b3eb3cSopenharmony_ci          "jsview/js_dynamic_component.cpp",
97623b3eb3cSopenharmony_ci          "jsview/js_isolated_component.cpp",
97723b3eb3cSopenharmony_ci        ]
97823b3eb3cSopenharmony_ci      }
97923b3eb3cSopenharmony_ci    }
98023b3eb3cSopenharmony_ci
98123b3eb3cSopenharmony_ci    if (defined(config.enable_ability_component) &&
98223b3eb3cSopenharmony_ci        config.enable_ability_component) {
98323b3eb3cSopenharmony_ci      sources += [
98423b3eb3cSopenharmony_ci        "jsview/js_ability_component.cpp",
98523b3eb3cSopenharmony_ci        "jsview/js_ability_component_controller.cpp",
98623b3eb3cSopenharmony_ci      ]
98723b3eb3cSopenharmony_ci
98823b3eb3cSopenharmony_ci      external_deps += [
98923b3eb3cSopenharmony_ci        "input:libmmi-client",
99023b3eb3cSopenharmony_ci        "window_manager:scene_session",
99123b3eb3cSopenharmony_ci      ]
99223b3eb3cSopenharmony_ci    }
99323b3eb3cSopenharmony_ci
99423b3eb3cSopenharmony_ci    if (defined(config.form_components_support) &&
99523b3eb3cSopenharmony_ci        config.form_components_support) {
99623b3eb3cSopenharmony_ci      sources += [ "jsview/js_form.cpp" ]
99723b3eb3cSopenharmony_ci    }
99823b3eb3cSopenharmony_ci
99923b3eb3cSopenharmony_ci    if (defined(config.plugin_components_support) &&
100023b3eb3cSopenharmony_ci        config.plugin_components_support) {
100123b3eb3cSopenharmony_ci      sources += [ "jsview/js_plugin.cpp" ]
100223b3eb3cSopenharmony_ci    }
100323b3eb3cSopenharmony_ci
100423b3eb3cSopenharmony_ci    if (defined(config.web_components_support) &&
100523b3eb3cSopenharmony_ci        config.web_components_support) {
100623b3eb3cSopenharmony_ci      sources += [
100723b3eb3cSopenharmony_ci        "jsview/js_richtext.cpp",
100823b3eb3cSopenharmony_ci        "jsview/js_web.cpp",
100923b3eb3cSopenharmony_ci        "jsview/js_web_controller.cpp",
101023b3eb3cSopenharmony_ci      ]
101123b3eb3cSopenharmony_ci    }
101223b3eb3cSopenharmony_ci
101323b3eb3cSopenharmony_ci    if (defined(config.remote_window_support) && config.remote_window_support) {
101423b3eb3cSopenharmony_ci      sources += [ "jsview/js_remote_window.cpp" ]
101523b3eb3cSopenharmony_ci    }
101623b3eb3cSopenharmony_ci
101723b3eb3cSopenharmony_ci    if (!defined(vendor_configs.ace_engine_advanced)) {
101823b3eb3cSopenharmony_ci      sources += [ "jsview/js_cached_image.cpp" ]
101923b3eb3cSopenharmony_ci    }
102023b3eb3cSopenharmony_ci
102123b3eb3cSopenharmony_ci    if (defined(config.xcomponent_components_support) &&
102223b3eb3cSopenharmony_ci        config.xcomponent_components_support) {
102323b3eb3cSopenharmony_ci      sources += [
102423b3eb3cSopenharmony_ci        "jsview/js_xcomponent.cpp",
102523b3eb3cSopenharmony_ci        "jsview/js_xcomponent_controller.cpp",
102623b3eb3cSopenharmony_ci      ]
102723b3eb3cSopenharmony_ci    }
102823b3eb3cSopenharmony_ci
102923b3eb3cSopenharmony_ci    if (defined(config.effect_component_support) &&
103023b3eb3cSopenharmony_ci        config.effect_component_support) {
103123b3eb3cSopenharmony_ci      sources += [
103223b3eb3cSopenharmony_ci        "jsview/js_effect_component.cpp",
103323b3eb3cSopenharmony_ci        #"jsview/models/effect_component_model_impl.cpp",
103423b3eb3cSopenharmony_ci      ]
103523b3eb3cSopenharmony_ci    }
103623b3eb3cSopenharmony_ci
103723b3eb3cSopenharmony_ci    if (defined(config.model_component_support) &&
103823b3eb3cSopenharmony_ci        config.model_component_support) {
103923b3eb3cSopenharmony_ci      sources += [ "jsview/js_sceneview.cpp" ]
104023b3eb3cSopenharmony_ci      external_deps += [ "graphic_3d:3dWidgetAdapterInterface" ]
104123b3eb3cSopenharmony_ci    }
104223b3eb3cSopenharmony_ci
104323b3eb3cSopenharmony_ci    if (defined(config.use_build_in_js_engine) &&
104423b3eb3cSopenharmony_ci        config.use_build_in_js_engine) {
104523b3eb3cSopenharmony_ci      deps += [ "$ace_root/frameworks/bridge:framework_bridge_ng_$platform" ]
104623b3eb3cSopenharmony_ci      defines += [ "BUILT_IN_JS_ENGINE" ]
104723b3eb3cSopenharmony_ci    } else {
104823b3eb3cSopenharmony_ci      if (is_asan) {
104923b3eb3cSopenharmony_ci        deps += [ "$ace_root/build:libace_compatible" ]
105023b3eb3cSopenharmony_ci      } else {
105123b3eb3cSopenharmony_ci        deps += [ "$ace_root/build:libace" ]
105223b3eb3cSopenharmony_ci      }
105323b3eb3cSopenharmony_ci      if (defined(config.build_container_scope_lib) &&
105423b3eb3cSopenharmony_ci          config.build_container_scope_lib) {
105523b3eb3cSopenharmony_ci        deps += [ "$ace_root/frameworks/core:ace_container_scope" ]
105623b3eb3cSopenharmony_ci      }
105723b3eb3cSopenharmony_ci    }
105823b3eb3cSopenharmony_ci
105923b3eb3cSopenharmony_ci    # add for cross_platfrom_build temporarily, shall be removed after external_deps is supported
106023b3eb3cSopenharmony_ci    if (is_arkui_x) {
106123b3eb3cSopenharmony_ci      sources -= [
106223b3eb3cSopenharmony_ci        "interfaces/profiler/js_profiler.cpp",
106323b3eb3cSopenharmony_ci        "jsview/js_location_button.cpp",
106423b3eb3cSopenharmony_ci        "jsview/js_paste_button.cpp",
106523b3eb3cSopenharmony_ci        "jsview/js_save_button.cpp",
106623b3eb3cSopenharmony_ci        "jsview/js_sec_button_base.cpp",
106723b3eb3cSopenharmony_ci        "jsview/menu/js_context_menu.cpp",
106823b3eb3cSopenharmony_ci      ]
106923b3eb3cSopenharmony_ci      configs += [ "$ark_ets_path:ark_jsruntime_public_config" ]
107023b3eb3cSopenharmony_ci      deps += [
107123b3eb3cSopenharmony_ci        "$ark_ets_path:libark_jsruntime_static",
107223b3eb3cSopenharmony_ci        "//foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing:drawing_napi_impl",
107323b3eb3cSopenharmony_ci      ]
107423b3eb3cSopenharmony_ci      if (defined(config.pixel_map_support) && config.pixel_map_support) {
107523b3eb3cSopenharmony_ci        configs += [ "//foundation/multimedia/image_framework/interfaces/innerkits:image_external_config" ]
107623b3eb3cSopenharmony_ci      }
107723b3eb3cSopenharmony_ci    } else {
107823b3eb3cSopenharmony_ci      external_deps += [
107923b3eb3cSopenharmony_ci        "ets_runtime:libark_jsruntime",
108023b3eb3cSopenharmony_ci        "napi:ace_napi",
108123b3eb3cSopenharmony_ci      ]
108223b3eb3cSopenharmony_ci    }
108323b3eb3cSopenharmony_ci
108423b3eb3cSopenharmony_ci    if (defined(config.enable_drag_framework) && config.enable_drag_framework &&
108523b3eb3cSopenharmony_ci        defined(global_parts_info.distributeddatamgr_udmf)) {
108623b3eb3cSopenharmony_ci      external_deps += [
108723b3eb3cSopenharmony_ci        "udmf:udmf_client",
108823b3eb3cSopenharmony_ci        "udmf:udmf_data_napi",
108923b3eb3cSopenharmony_ci      ]
109023b3eb3cSopenharmony_ci    }
109123b3eb3cSopenharmony_ci
109223b3eb3cSopenharmony_ci    if (!use_mingw_win && !use_mac && !use_linux) {
109323b3eb3cSopenharmony_ci      external_deps += [
109423b3eb3cSopenharmony_ci        "image_framework:image",
109523b3eb3cSopenharmony_ci        "image_framework:image_native",
109623b3eb3cSopenharmony_ci      ]
109723b3eb3cSopenharmony_ci    }
109823b3eb3cSopenharmony_ci  }
109923b3eb3cSopenharmony_ci}
110023b3eb3cSopenharmony_ci
110123b3eb3cSopenharmony_ci# dynamic generate js_engine targets
110223b3eb3cSopenharmony_ciforeach(item, ace_platforms) {
110323b3eb3cSopenharmony_ci  platform = item.name
110423b3eb3cSopenharmony_ci  engine_config = {
110523b3eb3cSopenharmony_ci  }
110623b3eb3cSopenharmony_ci  engine_config = item.config
110723b3eb3cSopenharmony_ci  support_engines = []
110823b3eb3cSopenharmony_ci  support_engines = engine_config.js_engines
110923b3eb3cSopenharmony_ci  foreach(engine, support_engines) {
111023b3eb3cSopenharmony_ci    declarative_js_engine(
111123b3eb3cSopenharmony_ci        "declarative_js_engine_${engine.engine_name}_$platform") {
111223b3eb3cSopenharmony_ci      platform = item.name
111323b3eb3cSopenharmony_ci      engine_name = engine.engine_name
111423b3eb3cSopenharmony_ci      engine_path = engine.engine_path
111523b3eb3cSopenharmony_ci      defines = engine.engine_defines
111623b3eb3cSopenharmony_ci
111723b3eb3cSopenharmony_ci      config = {
111823b3eb3cSopenharmony_ci      }
111923b3eb3cSopenharmony_ci      if (defined(item.config)) {
112023b3eb3cSopenharmony_ci        config = item.config
112123b3eb3cSopenharmony_ci      }
112223b3eb3cSopenharmony_ci      if (defined(config.defines)) {
112323b3eb3cSopenharmony_ci        defines += config.defines
112423b3eb3cSopenharmony_ci      }
112523b3eb3cSopenharmony_ci    }
112623b3eb3cSopenharmony_ci
112723b3eb3cSopenharmony_ci    declarative_js_engine_ng(
112823b3eb3cSopenharmony_ci        "declarative_js_engine_ng_${engine.engine_name}_$platform") {
112923b3eb3cSopenharmony_ci      platform = item.name
113023b3eb3cSopenharmony_ci      engine_name = engine.engine_name
113123b3eb3cSopenharmony_ci      engine_path = engine.engine_path
113223b3eb3cSopenharmony_ci      defines = engine.engine_defines
113323b3eb3cSopenharmony_ci
113423b3eb3cSopenharmony_ci      config = {
113523b3eb3cSopenharmony_ci      }
113623b3eb3cSopenharmony_ci      if (defined(item.config)) {
113723b3eb3cSopenharmony_ci        config = item.config
113823b3eb3cSopenharmony_ci      }
113923b3eb3cSopenharmony_ci      if (defined(config.defines)) {
114023b3eb3cSopenharmony_ci        defines += config.defines
114123b3eb3cSopenharmony_ci      }
114223b3eb3cSopenharmony_ci    }
114323b3eb3cSopenharmony_ci  }
114423b3eb3cSopenharmony_ci}
114523b3eb3cSopenharmony_ci
114623b3eb3cSopenharmony_ciohos_abc("statemanagement") {
114723b3eb3cSopenharmony_ci  sources = [ "engine/jsStateManagement.js" ]
114823b3eb3cSopenharmony_ci  output_name = "statemanagement"
114923b3eb3cSopenharmony_ci  install_images = [ "system" ]
115023b3eb3cSopenharmony_ci  module_install_dir = "etc/abc/arkui"
115123b3eb3cSopenharmony_ci  subsystem_name = ace_engine_subsystem
115223b3eb3cSopenharmony_ci  part_name = ace_engine_part
115323b3eb3cSopenharmony_ci}
115423b3eb3cSopenharmony_ci
115523b3eb3cSopenharmony_ciohos_abc("mock") {
115623b3eb3cSopenharmony_ci  sources = [ "engine/jsMock.js" ]
115723b3eb3cSopenharmony_ci  output_name = "mock"
115823b3eb3cSopenharmony_ci  install_images = [ "system" ]
115923b3eb3cSopenharmony_ci  module_install_dir = "etc/abc/arkui"
116023b3eb3cSopenharmony_ci  subsystem_name = ace_engine_subsystem
116123b3eb3cSopenharmony_ci  part_name = ace_engine_part
116223b3eb3cSopenharmony_ci}
116323b3eb3cSopenharmony_ci
116423b3eb3cSopenharmony_ciohos_abc("x_node") {
116523b3eb3cSopenharmony_ci  sources = [ "engine/jsXNode.js" ]
116623b3eb3cSopenharmony_ci  output_name = "node"
116723b3eb3cSopenharmony_ci  install_images = [ "system" ]
116823b3eb3cSopenharmony_ci  module_install_dir = "etc/abc/arkui"
116923b3eb3cSopenharmony_ci  subsystem_name = ace_engine_subsystem
117023b3eb3cSopenharmony_ci  part_name = ace_engine_part
117123b3eb3cSopenharmony_ci}
117223b3eb3cSopenharmony_ci
117323b3eb3cSopenharmony_ciohos_abc("prefetcher") {
117423b3eb3cSopenharmony_ci  sources = [ "engine/jsPrefetcher.js" ]
117523b3eb3cSopenharmony_ci  output_name = "prefetcher"
117623b3eb3cSopenharmony_ci  install_images = [ "system" ]
117723b3eb3cSopenharmony_ci  module_install_dir = "etc/abc/arkui"
117823b3eb3cSopenharmony_ci  subsystem_name = ace_engine_subsystem
117923b3eb3cSopenharmony_ci  part_name = ace_engine_part
118023b3eb3cSopenharmony_ci}
118123b3eb3cSopenharmony_ci
118223b3eb3cSopenharmony_ciaction("gen_uicontext_ohos") {
118323b3eb3cSopenharmony_ci  script = "$ace_root/build/tools/gen_uicontext_ohos.py"
118423b3eb3cSopenharmony_ci  inputs = [
118523b3eb3cSopenharmony_ci    "$ace_root/frameworks/bridge/declarative_frontend/engine/jsUIContext.js",
118623b3eb3cSopenharmony_ci  ]
118723b3eb3cSopenharmony_ci  outputs = [ "$base_output_path/jsUIContext_ohos.js" ]
118823b3eb3cSopenharmony_ci  args = [
118923b3eb3cSopenharmony_ci    rebase_path(inputs[0]),
119023b3eb3cSopenharmony_ci    rebase_path(outputs[0]),
119123b3eb3cSopenharmony_ci  ]
119223b3eb3cSopenharmony_ci}
119323b3eb3cSopenharmony_ci
119423b3eb3cSopenharmony_ciohos_abc("uicontext") {
119523b3eb3cSopenharmony_ci  sources = [ "$base_output_path/jsUIContext_ohos.js" ]
119623b3eb3cSopenharmony_ci  output_name = "uicontext"
119723b3eb3cSopenharmony_ci  deps = [ ":gen_uicontext_ohos" ]
119823b3eb3cSopenharmony_ci  install_images = [ "system" ]
119923b3eb3cSopenharmony_ci  module_install_dir = "etc/abc/arkui"
120023b3eb3cSopenharmony_ci  subsystem_name = ace_engine_subsystem
120123b3eb3cSopenharmony_ci  part_name = ace_engine_part
120223b3eb3cSopenharmony_ci}
120323b3eb3cSopenharmony_ci
120423b3eb3cSopenharmony_ciohos_abc("ark_theme_control") {
120523b3eb3cSopenharmony_ci  sources = [ "engine/arkThemeControl.js" ]
120623b3eb3cSopenharmony_ci  output_name = "theme"
120723b3eb3cSopenharmony_ci  install_images = [ "system" ]
120823b3eb3cSopenharmony_ci  module_install_dir = "etc/abc/arkui"
120923b3eb3cSopenharmony_ci  subsystem_name = ace_engine_subsystem
121023b3eb3cSopenharmony_ci  part_name = ace_engine_part
121123b3eb3cSopenharmony_ci}
121223b3eb3cSopenharmony_ci
121323b3eb3cSopenharmony_ciohos_abc("ark_modifier") {
121423b3eb3cSopenharmony_ci  sources = [ "engine/arkModifier.js" ]
121523b3eb3cSopenharmony_ci  output_name = "modifier"
121623b3eb3cSopenharmony_ci  install_images = [ "system" ]
121723b3eb3cSopenharmony_ci  module_install_dir = "etc/abc/arkui"
121823b3eb3cSopenharmony_ci  subsystem_name = ace_engine_subsystem
121923b3eb3cSopenharmony_ci  part_name = ace_engine_part
122023b3eb3cSopenharmony_ci}
122123b3eb3cSopenharmony_ci
122223b3eb3cSopenharmony_ciohos_abc("shape") {
122323b3eb3cSopenharmony_ci  sources = [ "engine/jsShape.js" ]
122423b3eb3cSopenharmony_ci  output_name = "shape"
122523b3eb3cSopenharmony_ci  install_images = [ "system" ]
122623b3eb3cSopenharmony_ci  module_install_dir = "etc/abc/arkui"
122723b3eb3cSopenharmony_ci  subsystem_name = ace_engine_subsystem
122823b3eb3cSopenharmony_ci  part_name = ace_engine_part
122923b3eb3cSopenharmony_ci}
1230