1# Copyright (C) 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/ohos.gni") 15 16config("upload_native_config") { 17 visibility = [ ":*" ] 18 include_dirs = [ "include" ] 19} 20 21config("upload_native_public_config") { 22 visibility = [] 23 include_dirs = [ 24 "include", 25 "//foundation/arkui/napi/interfaces/kits", 26 "//foundation/aafwk/standard/interfaces/kits/napi/aafwk/featureAbility", 27 "//foundation/aafwk/standard/interfaces/kits/napi/aafwk/inner/napi_common", 28 "//third_party/libuv/include", 29 "./", 30 "//base/miscservices/request/download/interfaces/kits/js/napi/download_single/include", 31 "//base/miscservices/request/download/utils/include", 32 ] 33} 34 35ohos_shared_library("request") { 36 sources = [ 37 "src/async_call.cpp", 38 "src/fail_callback.cpp", 39 "src/header_receive_callback.cpp", 40 "src/js_util.cpp", 41 "src/progress_callback.cpp", 42 "src/request_module.cpp", 43 "src/upload_task_napi.cpp", 44 ] 45 46 configs = [ ":upload_native_config" ] 47 48 deps = [ 49 "//base/miscservices/request/download/interfaces/kits/js/napi/download_single:downloadsingle", 50 "//base/miscservices/request/upload/frameworks/libs:upload_lib", 51 "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native", 52 "//foundation/ace/napi/:ace_napi", 53 "//third_party/libuv:uv_static", 54 "//utils/native/base:utils", 55 ] 56 57 external_deps = [ 58 "ability_runtime:ability_manager", 59 "ability_runtime:napi_base_context", 60 "hiviewdfx_hilog_native:libhilog", 61 ] 62 63 public_configs = [ ":upload_native_public_config" ] 64 65 relative_install_dir = "module" 66 subsystem_name = "miscservices" 67 part_name = "request" 68} 69