1// 2// Copyright (C) 2022 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15 16package { 17 default_applicable_licenses: ["external_leveldb_license"], 18} 19 20// Added automatically by a large-scale-change 21// See: http://go/android-license-faq 22license { 23 name: "external_leveldb_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-BSD", 27 ], 28 license_text: [ 29 "LICENSE", 30 ], 31} 32 33cc_defaults { 34 name: "leveldb_default_flags", 35 local_include_dirs: ["db/", "table/", "include/", "port/"], 36 cflags: [ 37 "-DLEVELDB_PLATFORM_POSIX", 38 "-Wall", 39 "-Werror", 40 "-Wextra", 41 "-Wno-implicit-fallthrough", 42 "-Wno-sign-compare", 43 "-Wno-incompatible-pointer-types", 44 "-Wno-missing-field-initializers", 45 "-Wno-unused-parameter", 46 "-Wno-unused-variable", 47 ], 48 sdk_version: "current", 49 min_sdk_version: "30", 50} 51 52cc_library { 53 name: "leveldb", 54 defaults: [ 55 "leveldb_default_flags", 56 ], 57 export_include_dirs: ["include/"], 58 visibility: ["//packages/providers/MediaProvider/jni"], 59 apex_available: [ 60 "com.android.mediaprovider", 61 ], 62 srcs: [ 63 "db/builder.cc", 64 "db/c.cc", 65 "db/db_impl.cc", 66 "db/db_iter.cc", 67 "db/dbformat.cc", 68 "db/dumpfile.cc", 69 "db/filename.cc", 70 "db/log_reader.cc", 71 "db/log_writer.cc", 72 "db/memtable.cc", 73 "db/repair.cc", 74 "db/table_cache.cc", 75 "db/version_edit.cc", 76 "db/version_set.cc", 77 "db/write_batch.cc", 78 "table/block_builder.cc", 79 "table/block.cc", 80 "table/filter_block.cc", 81 "table/format.cc", 82 "table/iterator.cc", 83 "table/merger.cc", 84 "table/table_builder.cc", 85 "table/table.cc", 86 "table/two_level_iterator.cc", 87 "util/arena.cc", 88 "util/bloom.cc", 89 "util/cache.cc", 90 "util/coding.cc", 91 "util/comparator.cc", 92 "util/crc32c.cc", 93 "util/env.cc", 94 "util/env_posix.cc", 95 "util/filter_policy.cc", 96 "util/hash.cc", 97 "util/logging.cc", 98 "util/options.cc", 99 "util/status.cc", 100 ], 101 stl: "c++_static", 102} 103 104cc_test { 105 name: "leveldb_test", 106 defaults: [ 107 "leveldb_default_flags", 108 ], 109 test_suites: ["general-tests"], 110 srcs: [ 111 "db/corruption_test.cc", 112 "db/dbformat_test.cc", 113 "db/fault_injection_test.cc", 114 "db/filename_test.cc", 115 "db/log_test.cc", 116 "db/recovery_test.cc", 117 "db/skiplist_test.cc", 118 "db/version_set_test.cc", 119 "db/write_batch_test.cc", 120 "table/filter_block_test.cc", 121 "table/table_test.cc", 122 "util/arena_test.cc", 123 "util/bloom_test.cc", 124 "util/cache_test.cc", 125 "util/coding_test.cc", 126 "util/crc32c_test.cc", 127 "util/hash_test.cc", 128 "util/logging_test.cc", 129 "util/no_destructor_test.cc", 130 "util/status_test.cc", 131 "util/testutil.cc", 132 "helpers/memenv/memenv.cc", 133 ], 134 static_libs: [ 135 "leveldb", 136 "libgmock_ndk", 137 ], 138 stl: "c++_static", 139} 140