1/* 2 * Copyright (C) 2018 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 */ 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_defaults { 22 name: "sysprop-defaults", 23 srcs: ["sysprop.proto", "Common.cpp", "CodeWriter.cpp"], 24 shared_libs: ["libbase", "liblog"], 25 static_libs: ["libc++fs", "libpropertyinfoserializer"], 26 proto: { 27 type: "full", 28 }, 29 local_include_dirs: ["include"], 30} 31 32cc_binary_host { 33 name: "sysprop_cpp", 34 defaults: ["sysprop-defaults"], 35 srcs: ["CppGen.cpp", "CppMain.cpp"], 36} 37 38cc_binary_host { 39 name: "sysprop_java", 40 defaults: ["sysprop-defaults"], 41 srcs: ["JavaGen.cpp", "JavaMain.cpp"], 42} 43 44cc_binary_host { 45 name: "sysprop_api_checker", 46 defaults: ["sysprop-defaults"], 47 srcs: ["ApiChecker.cpp", "ApiCheckerMain.cpp"], 48} 49 50cc_binary_host { 51 name: "sysprop_api_dump", 52 defaults: ["sysprop-defaults"], 53 srcs: ["ApiDumpMain.cpp"], 54} 55 56cc_binary_host { 57 name: "sysprop_type_checker", 58 defaults: ["sysprop-defaults"], 59 srcs: ["TypeChecker.cpp", "TypeCheckerMain.cpp"], 60} 61 62cc_test_host { 63 name: "sysprop_test", 64 defaults: ["sysprop-defaults"], 65 srcs: ["ApiChecker.cpp", 66 "CppGen.cpp", 67 "JavaGen.cpp", 68 "TypeChecker.cpp", 69 "tests/*.cpp"], 70 whole_static_libs: ["com.android.sysprop.tests"], 71 test_options: { 72 unit_test: true, 73 }, 74} 75 76java_defaults { 77 name: "sysprop-library-stub-defaults", 78 srcs: [ 79 "stub/**/*.java", 80 ], 81 installable: false, 82 sdk_version: "core_current", 83} 84 85java_library { 86 name: "sysprop-library-stub-platform", 87 defaults: ["sysprop-library-stub-defaults"], 88} 89 90java_library { 91 name: "sysprop-library-stub-vendor", 92 defaults: ["sysprop-library-stub-defaults"], 93 soc_specific: true, 94} 95 96java_library { 97 name: "sysprop-library-stub-product", 98 defaults: ["sysprop-library-stub-defaults"], 99 product_specific: true, 100} 101