8c6bd8d8创建于 2025年9月29日历史提交
# Copyright (c) 2025 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build/config/components/ets_frontend/ets2abc_config.gni")
import("//build/ohos.gni")
import("//foundation/arkui/ace_engine/ace_config.gni")

config("ani_config") {
  include_dirs = [
    "${ace_root}/frameworks",
    "${ace_root}/interfaces",
    "${ace_root}",
  ]
}

ohos_shared_library("shape_ani") {
  shlib_type = "ani"
  deps = [ "$ace_root/build:libace_compatible" ]
  public_configs = [ ":ani_config" ]
  sources = [
    "./src/circleShape.cpp",
    "./src/ellipseShape.cpp",
    "./src/pathShape.cpp",
    "./src/rectShape.cpp",
    "./src/shape.cpp",
    "./src/shapeUtil.cpp",
  ]
  external_deps = [ "runtime_core:ani" ]
  part_name = "ace_engine"
  subsystem_name = "arkui"
  output_extension = "so"
}

generate_static_abc("shape_ani_abc") {
  base_url = "./ets"
  files = [
    "./ets/@ohos.arkui.shape.ets",
    "./ets/arkui.component.units.ets",
    "./ets/arkui.component.enums.ets",
  ]
  paths_keys = [
    "@ohos.arkui.shape",
    "@ohos.arkui.component.Units",
  ]
  paths_values = [
    "./ets/@ohos.arkui.shape.ets",
    "./ets/@ohos.arkui.component.Units.ets",
  ]
  dst_file = target_out_dir + "/shape_ani.abc"
  out_puts = [ target_out_dir + "/shape_ani.abc" ]
  is_boot_abc = "True"
  device_dst_file = "/system/framework/shape_ani.abc"
}

ohos_prebuilt_etc("shape_etc") {
  source = target_out_dir + "/shape_ani.abc"
  deps = [ ":shape_ani_abc" ]
  module_install_dir = "framework"
  subsystem_name = "arkui"
  part_name = "ace_engine"
}