# 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/version.gni") declare_args() { # build ohos version build_public_version = true } declare_args() { enable_java = is_large_system } declare_args() { build_version_alpha = true } declare_args() { sdk_build_public = false } declare_args() { # Whether build the qemu images, this image is usd to run on emulator device. build_qemu_image = false # system package dir system_base_dir = "system" # ramdisk package dir ramdisk_base_dir = "ramdisk" # vendor package dir vendor_base_dir = "vendor" # chipset package dir chipset_base_dir = "vendor" # updater package dir updater_base_dir = "updater" # updater_vendor package dir updater_vendor_base_dir = "updater_vendor" # sys_prod package dir sys_prod_base_dir = "sys_prod" # eng_system package dir eng_system_base_dir = "eng_system" # eng_chipset package dir eng_chipset_base_dir = "eng_chipset" # chip_prod package dir chip_prod_base_dir = "chip_prod" # chipset passthrough libraries dir chipset_passthrough_dir = "chipsetsdk" # check sdk interface sdk_interface_check = true # is use sdk is_use_sdk = false # build test example build_example = false # check intersdk interface check_innersdk_interface = true gen_innersdk_interface_signature = false # sdk check check_sdk_interface = true gen_sdk_interface_signature = false # Whether to collect the ebpf testcase. ebpf_enable = false # Info files of test targets will remove source file paths when setting true. release_test_suite = false # Whether to enable scalable build. scalable_build = false # Whether to enable pycache or not. pycache_enable = true # Whether to build js bundle to ark bytecode build_ark = true # Whether to make Code_OpenSource.tar.gz make_osp = false # Enables EMMA Java code coverage. Instruments classes during build to # produce .ec files during runtime emma_coverage = false } declare_args() { build_platform = "" sparse_image = false } declare_args() { system_kits_package = false kits_api_statistics = false # ohos sdk build_ohos_sdk = false # Build ohos sdk compatibility jar build_bc_sdk = false # Which OS the generated SDK works on. possible values: 'win/mac/linux/default' sdk_platform = "default" } declare_args() { # Build ohos NDK build_ohos_ndk = false # Which OS the generated NDK works on. possible values: 'win/mac/linux/default' ndk_platform = "default" # Whether to archive or not, set to false in debug to save ndk build time. archive_ndk = true # Check ndk header signature, set false to generate header signature check_ndk_signature = false } declare_args() { archive_component = false } declare_args() { build_asan_clean = false } declare_args() { check_deps = false } declare_args() { enable_iccarm_sp = false } declare_args() { enforce_selinux = false } declare_args() { enable_notice_collection = true } declare_args() { skip_generate_module_list_file = false } declare_args() { ohos_skip_parse_external_deps = false } declare_args() { load_test_config = true } declare_args() { # Skip module_info generation when the packaging image is not needed skip_gen_module_info = false } declare_args() { build_variant = "root" device_type = "default" } declare_args() { is_use_check_deps = true } declare_args() { if (is_mac || is_ios) { enable_bitcode = false if (defined(product_build_config.enable_bitcode)) { enable_bitcode = product_build_config.enable_bitcode } } } declare_args() { bitcode_marker = false } declare_args() { is_opensource = true } # Upgrade Skia version use_new_skia = true # support changing the ohpm registry and sdk type declare_args() { ohpm_registry = "" } # build target type target_type = "${target_os}-${target_cpu}" is_system_component = exec_script(rebase_path("//build/scripts/dir_exists.py"), [ rebase_path("//foundation/arkui", root_build_dir) ], "string") == "True" parts_src_flag_file = "$root_build_dir/build_configs/parts_src_flag.json" innersdk_dir_name = "sdk/${target_type}" innersdk_base_dir = "//${innersdk_dir_name}" # Compile and generate output directory innersdk_build_out_dir = "innerkits/${target_type}" dist_dir_name = "component_dist/${target_type}" dist_build_out_dir = "${root_build_dir}/component_dist/${target_type}" dist_subsystem_info_filename = "dist_parts_info.json" # install packages archive dir define dist_install_packages_dir = "${dist_dir_name}/packages_to_install" dist_subsystem_info_file = "//${dist_install_packages_dir}/${dist_subsystem_info_filename}" dist_build_install_packages_dir = "${dist_build_out_dir}/packages_to_install" dist_subsystem_info_output_file = "${dist_build_install_packages_dir}/${dist_subsystem_info_filename}" ramdisk_dir_list = [] app_target_allowlist = [ "*:*_res", "*:*_resources", "*:*_resource", "*:*_assets", "*:*_asset", "*:*_profile", ] app_target_types = [ "hap", "resources", "js_assets", "ets_assets", "assets", "app_profile", ] ohos_package_names = [ "ohos.*", "ark.*", ] openjdk_package_names = [ "java.*", "javax.*", ] hapsigner = "//developtools/hapsigner/dist/hap-sign-tool.jar" hap_packing_tool = "${root_out_dir}/obj/developtools/packing_tool/jar/app_packing_tool.jar" nodejs = "//prebuilts/build-tools/common/nodejs/current/bin/node" npm = "//prebuilts/build-tools/common/nodejs/current/bin/npm" default_key_alias = "OpenHarmony Application Release" default_signature_algorithm = "SHA256withECDSA" default_hap_private_key_path = "123456" default_keystore_password = "123456" default_keystore_path = "//developtools/hapsigner/dist/OpenHarmony.p12" default_hap_certificate_file = "//developtools/hapsigner/dist/OpenHarmonyApplication.pem"