Inseob Kim | 5f8f32c | 2018-08-24 11:10:44 +0900 | [diff] [blame] | 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 | |
Bob Badour | 8221f1e | 2021-02-03 23:47:03 -0800 | [diff] [blame] | 17 | package { |
| 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 19 | } |
| 20 | |
Inseob Kim | 5f8f32c | 2018-08-24 11:10:44 +0900 | [diff] [blame] | 21 | cc_defaults { |
| 22 | name: "sysprop-defaults", |
| 23 | srcs: ["sysprop.proto", "Common.cpp", "CodeWriter.cpp"], |
Inseob Kim | ca4a2a4 | 2018-12-10 01:34:07 +0900 | [diff] [blame] | 24 | shared_libs: ["libbase", "liblog"], |
Inseob Kim | 472fb63 | 2020-03-21 03:29:39 +0900 | [diff] [blame] | 25 | static_libs: ["libc++fs", "libpropertyinfoserializer"], |
Inseob Kim | ca4a2a4 | 2018-12-10 01:34:07 +0900 | [diff] [blame] | 26 | proto: { |
| 27 | type: "full", |
| 28 | }, |
Inseob Kim | 803bfb8 | 2019-02-15 18:40:45 +0900 | [diff] [blame] | 29 | local_include_dirs: ["include"], |
Inseob Kim | 5f8f32c | 2018-08-24 11:10:44 +0900 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | cc_binary_host { |
| 33 | name: "sysprop_cpp", |
| 34 | defaults: ["sysprop-defaults"], |
| 35 | srcs: ["CppGen.cpp", "CppMain.cpp"], |
| 36 | } |
| 37 | |
| 38 | cc_binary_host { |
| 39 | name: "sysprop_java", |
| 40 | defaults: ["sysprop-defaults"], |
| 41 | srcs: ["JavaGen.cpp", "JavaMain.cpp"], |
| 42 | } |
Inseob Kim | ade45e2 | 2018-08-29 19:08:35 +0900 | [diff] [blame] | 43 | |
Inseob Kim | 900fbad | 2019-06-26 14:09:20 +0900 | [diff] [blame] | 44 | cc_binary_host { |
| 45 | name: "sysprop_api_checker", |
| 46 | defaults: ["sysprop-defaults"], |
| 47 | srcs: ["ApiChecker.cpp", "ApiCheckerMain.cpp"], |
| 48 | } |
| 49 | |
Inseob Kim | 5d3e688 | 2019-07-25 13:55:48 +0900 | [diff] [blame] | 50 | cc_binary_host { |
| 51 | name: "sysprop_api_dump", |
| 52 | defaults: ["sysprop-defaults"], |
| 53 | srcs: ["ApiDumpMain.cpp"], |
| 54 | } |
| 55 | |
Inseob Kim | 472fb63 | 2020-03-21 03:29:39 +0900 | [diff] [blame] | 56 | cc_binary_host { |
| 57 | name: "sysprop_type_checker", |
| 58 | defaults: ["sysprop-defaults"], |
| 59 | srcs: ["TypeChecker.cpp", "TypeCheckerMain.cpp"], |
| 60 | } |
| 61 | |
Inseob Kim | ade45e2 | 2018-08-29 19:08:35 +0900 | [diff] [blame] | 62 | cc_test_host { |
| 63 | name: "sysprop_test", |
| 64 | defaults: ["sysprop-defaults"], |
Inseob Kim | 900fbad | 2019-06-26 14:09:20 +0900 | [diff] [blame] | 65 | srcs: ["ApiChecker.cpp", |
Inseob Kim | 472fb63 | 2020-03-21 03:29:39 +0900 | [diff] [blame] | 66 | "CppGen.cpp", |
Inseob Kim | ade45e2 | 2018-08-29 19:08:35 +0900 | [diff] [blame] | 67 | "JavaGen.cpp", |
Inseob Kim | 472fb63 | 2020-03-21 03:29:39 +0900 | [diff] [blame] | 68 | "TypeChecker.cpp", |
Inseob Kim | ade45e2 | 2018-08-29 19:08:35 +0900 | [diff] [blame] | 69 | "tests/*.cpp"], |
Nikita Ioffe | 1f06005 | 2020-09-03 02:25:02 +0100 | [diff] [blame] | 70 | whole_static_libs: ["com.android.sysprop.tests"], |
Julien Desprez | 06b4102 | 2020-12-11 12:01:03 -0800 | [diff] [blame] | 71 | test_options: { |
| 72 | unit_test: true, |
| 73 | }, |
Inseob Kim | ade45e2 | 2018-08-29 19:08:35 +0900 | [diff] [blame] | 74 | } |
Inseob Kim | 38569c7 | 2019-07-30 18:36:28 +0900 | [diff] [blame] | 75 | |
| 76 | java_defaults { |
| 77 | name: "sysprop-library-stub-defaults", |
| 78 | srcs: [ |
Inseob Kim | 3f452c0 | 2020-03-31 13:41:19 +0900 | [diff] [blame] | 79 | "stub/**/*.java", |
Inseob Kim | 38569c7 | 2019-07-30 18:36:28 +0900 | [diff] [blame] | 80 | ], |
| 81 | installable: false, |
| 82 | sdk_version: "core_current", |
| 83 | } |
| 84 | |
| 85 | java_library { |
| 86 | name: "sysprop-library-stub-platform", |
| 87 | defaults: ["sysprop-library-stub-defaults"], |
| 88 | } |
| 89 | |
| 90 | java_library { |
| 91 | name: "sysprop-library-stub-vendor", |
| 92 | defaults: ["sysprop-library-stub-defaults"], |
| 93 | soc_specific: true, |
| 94 | } |
Inseob Kim | 6b842c7 | 2020-10-20 16:35:15 +0900 | [diff] [blame] | 95 | |
| 96 | java_library { |
| 97 | name: "sysprop-library-stub-product", |
| 98 | defaults: ["sysprop-library-stub-defaults"], |
| 99 | product_specific: true, |
| 100 | } |