代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/developtools_ace_ets2bundle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (c) 2021 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/ohos.gni")
import("//build/ohos/ace/ace.gni")
import("//build/ohos_var.gni")
import("//foundation/arkui/ace_engine/ace_config.gni")
if (sdk_build_public) {
import("//out/sdk-public/public_interface/sdk-js/interface_config.gni")
} else {
import("//interface/sdk-js/interface_config.gni")
}
ets_loader_lib_dir =
get_label_info(":build_ets_loader_library", "target_out_dir") + "/lib"
ets_loader_declarations_dir = get_label_info(":build_ets_loader_library",
"target_out_dir") + "/declarations"
ets_loader_component_config_file =
get_label_info(":build_ets_loader_library", "target_out_dir") +
"/component_config.json"
ets_loader_form_config_file =
get_label_info(":build_ets_loader_library", "target_out_dir") +
"/form_config.json"
ets_sysResource = get_label_info(":build_ets_sysResource", "target_out_dir") +
"/sysResource.js"
ets_loader_kit_configs_dir = get_label_info(":build_ets_loader_library",
"target_out_dir") + "/kit_configs"
action("build_ets_loader_library") {
deps = [
":components",
":form_components",
":install_arkguard_tsc",
":server",
]
script = "build_ets_loader_library.py"
depfile = "$target_gen_dir/$target_name.d"
outputs = [
ets_loader_lib_dir,
ets_loader_declarations_dir,
ets_loader_component_config_file,
ets_loader_form_config_file,
ets_loader_kit_configs_dir,
]
_ets_loader_dir = "compiler"
if (is_standard_system) {
_ace_config_dir = "compiler"
} else {
_ace_config_dir = "//prebuilts/ace-toolkit/ets-loader/compiler"
}
_declarations_file_dir = "//interface/sdk-js/api/@internal/component/ets"
_kit_configs_file_dir = "//interface/sdk-js/api/kits"
if (sdk_build_public) {
_declarations_file_dir =
"//out/sdk-public/public_interface/sdk-js/api/@internal/component/ets"
_kit_configs_file_dir = "//out/sdk-public/public_interface/sdk-js/api/kits"
}
_babel_js = _ace_config_dir + "/node_modules/@babel/cli/bin/babel.js"
_babel_config_js = _ace_config_dir + "/babel.config.js"
_uglify_source_js = _ace_config_dir + "/uglify-source.js"
_build_declarations_file_js = _ace_config_dir + "/build_declarations_file.js"
_build_kit_configs_file_js = _ace_config_dir + "/build_kitConfigs_file.js"
inputs = [
_babel_config_js,
_babel_js,
_uglify_source_js,
_build_declarations_file_js,
_build_kit_configs_file_js,
]
nodejs_path = "//prebuilts/build-tools/common/nodejs/current/bin/node"
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
"--node",
rebase_path(nodejs_path, root_build_dir),
"--babel-js",
rebase_path(_babel_js, root_build_dir),
"--ets-loader-src-dir",
rebase_path(_ets_loader_dir + "/src", root_build_dir),
"--babel-config-js",
rebase_path(_babel_config_js, root_build_dir),
"--uglify-source-js",
rebase_path(_uglify_source_js, root_build_dir),
"--output-dir",
rebase_path(ets_loader_lib_dir, root_build_dir),
"--declarations-file-dir",
rebase_path(_declarations_file_dir, root_build_dir),
"--build-declarations-file-js",
rebase_path(_build_declarations_file_js, root_build_dir),
"--output-declarations-dir",
rebase_path(ets_loader_declarations_dir, root_build_dir),
"--output-component-config-file",
rebase_path(ets_loader_component_config_file, root_build_dir),
"--output-form-config-file",
rebase_path(ets_loader_form_config_file, root_build_dir),
"--kit-configs-file-dir",
rebase_path(_kit_configs_file_dir, root_build_dir),
"--build-kit-configs-file-js",
rebase_path(_build_kit_configs_file_js, root_build_dir),
"--output-kit-configs-dir",
rebase_path(ets_loader_kit_configs_dir, root_build_dir),
]
}
action("build_ets_sysResource") {
if (is_standard_system) {
script = "//developtools/ace_ets2bundle/generateSysResource.py"
} else {
script = "//foundation/ace/huawei_proprietary/tools/ets-loader/generateSysResource.py"
}
outputs = [ ets_sysResource ]
_id_defined_json = "//base/global/system_resources/systemres/main/resources/base/element/id_defined.json"
inputs = [ _id_defined_json ]
args = [
"--input-json",
rebase_path(_id_defined_json, root_build_dir),
"--output-js",
rebase_path(ets_sysResource, root_build_dir),
]
}
ets_loader_sources = [
"compiler/compile_plugin.js",
"compiler/main.js",
"compiler/node_modules",
"compiler/npm-install.js",
"compiler/package-lock.json",
"compiler/package.json",
"compiler/rollup.config.js",
"compiler/tsconfig.esm.json",
"compiler/tsconfig.json",
"compiler/webpack.config.js",
]
ohos_copy("ets_loader") {
deps = [
":build_ets_loader_library",
":install_arkguard_tsc",
]
sources = ets_loader_sources
deps += [ ":build_ets_sysResource" ]
sources += [ ets_sysResource ]
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
}
ohos_copy("ets_loader_component_config") {
deps = [ ":build_ets_loader_library" ]
sources = [ ets_loader_component_config_file ]
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
}
ohos_copy("ets_loader_form_config") {
deps = [ ":build_ets_loader_library" ]
sources = [ ets_loader_form_config_file ]
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
}
ohos_copy("ets_loader_library") {
deps = [ ":build_ets_loader_library" ]
sources = [ ets_loader_lib_dir ]
outputs = [ target_out_dir + "/$target_name" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
}
ohos_copy("ets_loader_kit_configs") {
deps = [ ":build_ets_loader_library" ]
sources = [ ets_loader_kit_configs_dir ]
outputs = [ target_out_dir + "/$target_name" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
}
ohos_copy("components") {
sources = [ "compiler/components" ]
outputs = [ target_out_dir + "/$target_name" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
}
ohos_copy("form_components") {
sources = [ "compiler/form_components" ]
outputs = [ target_out_dir + "/$target_name" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
}
ohos_copy("server") {
sources = [ "compiler/server" ]
outputs = [ target_out_dir + "/$target_name" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
}
ohos_copy("codegen") {
sources = [ "compiler/codegen" ]
outputs = [ target_out_dir + "/$target_name" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
}
ohos_copy("ets_loader_declaration") {
deps = [ ":build_ets_loader_library" ]
sources = [ ets_loader_declarations_dir ]
outputs = [ target_out_dir + "/$target_name" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
}
ohos_copy("ets_loader_ark") {
deps = [
":build_ets_loader_library",
":install_arkguard_tsc",
]
sources = ets_loader_sources
deps += [ ":build_ets_sysResource" ]
sources += [ ets_sysResource ]
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
}
ohos_copy("ets_loader_ark_lib") {
deps = [
":build_ets_loader_library",
":ets_loader_ark",
]
sources = [ ets_loader_lib_dir ]
outputs = [ target_out_dir + "/ets_loader_ark/lib" ]
}
ohos_copy("ets_loader_ark_declaration") {
deps = [
":build_ets_loader_library",
":ets_loader_ark",
]
sources = [ ets_loader_declarations_dir ]
outputs = [ target_out_dir + "/ets_loader_ark/declarations" ]
}
ohos_copy("ets_loader_ark_components") {
deps = [
":build_ets_loader_library",
":ets_loader_ark",
]
sources = [ "compiler/components" ]
outputs = [ target_out_dir + "/ets_loader_ark/components" ]
}
ohos_copy("ets_loader_ark_form_components") {
deps = [
":build_ets_loader_library",
":ets_loader_ark",
]
sources = [ "compiler/form_components" ]
outputs = [ target_out_dir + "/ets_loader_ark/form_components" ]
}
ohos_copy("ets_loader_ark_server") {
deps = [
":build_ets_loader_library",
":ets_loader_ark",
]
sources = [ "compiler/server" ]
outputs = [ target_out_dir + "/ets_loader_ark/server" ]
}
ohos_copy("ets_loader_ark_codegen") {
deps = [
":build_ets_loader_library",
":ets_loader_ark",
]
sources = [ "compiler/codegen" ]
outputs = [ target_out_dir + "/ets_loader_ark/codegen" ]
}
ohos_copy("ohos_declaration_ets_ark") {
deps = []
if (sdk_build_public) {
deps += [ "//out/sdk-public/public_interface/sdk-js:ohos_declaration_ets" ]
} else {
deps += [ "//interface/sdk-js:ohos_declaration_ets" ]
}
sources = [ root_out_dir + "/ohos_declaration/ohos_declaration_ets" ]
outputs = [ target_out_dir + "/../api" ]
}
ohos_copy("ets_loader_ark_hap") {
sources = common_api_src
deps = [
":ets_loader_ark",
":ets_loader_ark_codegen",
":ets_loader_ark_components",
":ets_loader_ark_declaration",
":ets_loader_ark_form_components",
":ets_loader_ark_lib",
":ets_loader_ark_server",
":ohos_declaration_ets_ark",
]
outputs = [ target_out_dir + "/../../developtools/api/{{source_file_part}}" ]
module_install_name = ""
}
action("install_arkguard_tsc") {
deps = [
"//arkcompiler/ets_frontend/arkguard:build_arkguard",
"//third_party/typescript:build_typescript",
]
script = "install_arkguard_tsc.py"
args = [
rebase_path(
"${root_out_dir}/obj/third_party/typescript/ohos-typescript-4.9.5-r4.tgz"),
rebase_path(
"${root_out_dir}/obj/arkcompiler/ets_frontend/arkguard/arkguard-1.1.3.tgz"),
rebase_path("//developtools/ace_ets2bundle/compiler"),
current_os,
]
outputs = [ "${target_out_dir}/${target_name}.stamp" ]
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。