1# Copyright (c) 2021-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/lite/config/component/lite_component.gni") 15import("//build/lite/ndk/ndk.gni") 16import("//foundation/communication/netstack/netstack_config.gni") 17 18http_lite_sources = [ 19 "fetch/src/fetch_module.cpp", 20 "fetch/src/http_async_callback.cpp", 21 "fetch/src/http_constant.cpp", 22 "fetch/src/http_request.cpp", 23 "fetch/src/http_request_utils.cpp", 24 "fetch/src/request_data.cpp", 25 "fetch/src/response_data.cpp", 26] 27 28http_lite_include_dirs = [ 29 "fetch/include", 30 31 "$THIRD_PARTY_ROOT/curl/include", 32 "$THIRD_PARTY_ROOT/bounds_checking_function/include", 33 34 "$ARKUI_ROOT/ace_engine_lite/interfaces/inner_api/builtin/async", 35 "$ARKUI_ROOT/ace_engine_lite/interfaces/inner_api/builtin/jsi", 36 "$ARKUI_ROOT/ace_engine_lite/interfaces/inner_api/builtin/base", 37 38 "$ARKUI_ROOT/ace_engine_lite/frameworks/common/utils", 39 "$ARKUI_ROOT/ace_engine_lite/frameworks/common/log", 40 41 "$HILOG_LITE_ROOT/interfaces/native/kits", 42 "$ARKUI_ROOT/ace_engine_lite/frameworks/targets/liteos_a", 43] 44 45config("http_lite_config") { 46 include_dirs = http_lite_include_dirs 47 defines = [ "NO_SSL_CERTIFICATION=1" ] 48} 49 50lite_library("http_lite_shared") { 51 target_type = "shared_library" 52 sources = http_lite_sources 53 public_configs = [ ":http_lite_config" ] 54 output_name = "http_lite" 55 deps = [ 56 "$ARKUI_ROOT/ace_engine_lite/frameworks/common:ace_common_lite", 57 "$THIRD_PARTY_ROOT/bounds_checking_function:libsec_shared", 58 ] 59 external_deps = [ "curl:libcurl_shared" ] 60} 61 62ndk_lib("http_lite_ndk") { 63 lib_extension = ".so" 64 deps = [ ":http_lite_shared" ] 65 head_files = 66 [ "//foundation/communication/netstack/http_lite/frameworks/js/builtin" ] 67} 68