1# Copyright (c) 2023 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") 15import("//build/test.gni") 16 17module_output_path = "asset/asset" 18 19ohos_rust_static_library("asset_db_operator") { 20 sources = [ "src/lib.rs" ] 21 deps = [ 22 ":asset_sqlite3_wrapper", 23 "../../frameworks/definition:asset_definition", 24 "../../frameworks/os_dependency/file:asset_file_operator", 25 "../../frameworks/os_dependency/log:asset_log", 26 "../../frameworks/utils:asset_utils", 27 "../common:asset_common", 28 "../crypto_manager:asset_crypto_manager", 29 "../db_key_operator:asset_db_key_operator", 30 "//third_party/rust/crates/lazy-static.rs:lib", 31 "//third_party/rust/crates/serde/serde:lib", 32 ] 33 34 external_deps = [ 35 "ylong_json:lib", 36 ] 37 38 crate_name = "asset_db_operator" 39 crate_type = "rlib" 40 subsystem_name = "security" 41 part_name = "asset" 42} 43 44ohos_rust_unittest("rust_asset_db_operator_test") { 45 module_out_path = module_output_path 46 sources = [ "src/lib.rs" ] 47 deps = [ 48 ":asset_sqlite3_wrapper", 49 "../../frameworks/definition:asset_definition", 50 "../../frameworks/os_dependency/file:asset_file_operator", 51 "../../frameworks/os_dependency/log:asset_log", 52 "../../frameworks/utils:asset_utils", 53 "../common:asset_common", 54 "../crypto_manager:asset_crypto_manager", 55 "../db_key_operator:asset_db_key_operator", 56 "//third_party/rust/crates/lazy-static.rs:lib", 57 "//third_party/rust/crates/serde/serde:lib", 58 ] 59 60 external_deps = [ 61 "hilog:libhilog", 62 "ylong_json:lib", 63 ] 64 subsystem_name = "security" 65 part_name = "asset" 66} 67 68ohos_static_library("asset_sqlite3_wrapper") { 69 sources = [ "src/sqlite3_wrapper.c" ] 70 external_deps = [ "sqlite:sqlite" ] 71 subsystem_name = "security" 72 part_name = "asset" 73} 74