11e934351Sopenharmony_ci# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 21e934351Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 31e934351Sopenharmony_ci# you may not use this file except in compliance with the License. 41e934351Sopenharmony_ci# You may obtain a copy of the License at 51e934351Sopenharmony_ci# 61e934351Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 71e934351Sopenharmony_ci# 81e934351Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 91e934351Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 101e934351Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 111e934351Sopenharmony_ci# See the License for the specific language governing permissions and 121e934351Sopenharmony_ci# limitations under the License. 131e934351Sopenharmony_ci 141e934351Sopenharmony_ciimport("//build/lite/config/component/lite_component.gni") 151e934351Sopenharmony_ciimport("//build/lite/ndk/ndk.gni") 161e934351Sopenharmony_ciimport("//foundation/communication/netstack/netstack_config.gni") 171e934351Sopenharmony_ci 181e934351Sopenharmony_cihttp_lite_sources = [ 191e934351Sopenharmony_ci "fetch/src/fetch_module.cpp", 201e934351Sopenharmony_ci "fetch/src/http_async_callback.cpp", 211e934351Sopenharmony_ci "fetch/src/http_constant.cpp", 221e934351Sopenharmony_ci "fetch/src/http_request.cpp", 231e934351Sopenharmony_ci "fetch/src/http_request_utils.cpp", 241e934351Sopenharmony_ci "fetch/src/request_data.cpp", 251e934351Sopenharmony_ci "fetch/src/response_data.cpp", 261e934351Sopenharmony_ci] 271e934351Sopenharmony_ci 281e934351Sopenharmony_cihttp_lite_include_dirs = [ 291e934351Sopenharmony_ci "fetch/include", 301e934351Sopenharmony_ci 311e934351Sopenharmony_ci "$THIRD_PARTY_ROOT/curl/include", 321e934351Sopenharmony_ci "$THIRD_PARTY_ROOT/bounds_checking_function/include", 331e934351Sopenharmony_ci 341e934351Sopenharmony_ci "$ARKUI_ROOT/ace_engine_lite/interfaces/inner_api/builtin/async", 351e934351Sopenharmony_ci "$ARKUI_ROOT/ace_engine_lite/interfaces/inner_api/builtin/jsi", 361e934351Sopenharmony_ci "$ARKUI_ROOT/ace_engine_lite/interfaces/inner_api/builtin/base", 371e934351Sopenharmony_ci 381e934351Sopenharmony_ci "$ARKUI_ROOT/ace_engine_lite/frameworks/common/utils", 391e934351Sopenharmony_ci "$ARKUI_ROOT/ace_engine_lite/frameworks/common/log", 401e934351Sopenharmony_ci 411e934351Sopenharmony_ci "$HILOG_LITE_ROOT/interfaces/native/kits", 421e934351Sopenharmony_ci "$ARKUI_ROOT/ace_engine_lite/frameworks/targets/liteos_a", 431e934351Sopenharmony_ci] 441e934351Sopenharmony_ci 451e934351Sopenharmony_ciconfig("http_lite_config") { 461e934351Sopenharmony_ci include_dirs = http_lite_include_dirs 471e934351Sopenharmony_ci defines = [ "NO_SSL_CERTIFICATION=1" ] 481e934351Sopenharmony_ci} 491e934351Sopenharmony_ci 501e934351Sopenharmony_cilite_library("http_lite_shared") { 511e934351Sopenharmony_ci target_type = "shared_library" 521e934351Sopenharmony_ci sources = http_lite_sources 531e934351Sopenharmony_ci public_configs = [ ":http_lite_config" ] 541e934351Sopenharmony_ci output_name = "http_lite" 551e934351Sopenharmony_ci deps = [ 561e934351Sopenharmony_ci "$ARKUI_ROOT/ace_engine_lite/frameworks/common:ace_common_lite", 571e934351Sopenharmony_ci "$THIRD_PARTY_ROOT/bounds_checking_function:libsec_shared", 581e934351Sopenharmony_ci ] 591e934351Sopenharmony_ci external_deps = [ "curl:libcurl_shared" ] 601e934351Sopenharmony_ci} 611e934351Sopenharmony_ci 621e934351Sopenharmony_cindk_lib("http_lite_ndk") { 631e934351Sopenharmony_ci lib_extension = ".so" 641e934351Sopenharmony_ci deps = [ ":http_lite_shared" ] 651e934351Sopenharmony_ci head_files = 661e934351Sopenharmony_ci [ "//foundation/communication/netstack/http_lite/frameworks/js/builtin" ] 671e934351Sopenharmony_ci} 68