blob: e63a6ff8dcd3559fa16824dec068f140705a781f [file] [log] [blame]
Inseob Kim5f8f32c2018-08-24 11:10:44 +09001/*
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 Badour8221f1e2021-02-03 23:47:03 -080017package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
Inseob Kim5f8f32c2018-08-24 11:10:44 +090021cc_defaults {
22 name: "sysprop-defaults",
23 srcs: ["sysprop.proto", "Common.cpp", "CodeWriter.cpp"],
Inseob Kimca4a2a42018-12-10 01:34:07 +090024 shared_libs: ["libbase", "liblog"],
Inseob Kim472fb632020-03-21 03:29:39 +090025 static_libs: ["libc++fs", "libpropertyinfoserializer"],
Inseob Kimca4a2a42018-12-10 01:34:07 +090026 proto: {
27 type: "full",
28 },
Inseob Kim803bfb82019-02-15 18:40:45 +090029 local_include_dirs: ["include"],
Inseob Kim5f8f32c2018-08-24 11:10:44 +090030}
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}
Inseob Kimade45e22018-08-29 19:08:35 +090043
Inseob Kim900fbad2019-06-26 14:09:20 +090044cc_binary_host {
45 name: "sysprop_api_checker",
46 defaults: ["sysprop-defaults"],
47 srcs: ["ApiChecker.cpp", "ApiCheckerMain.cpp"],
48}
49
Inseob Kim5d3e6882019-07-25 13:55:48 +090050cc_binary_host {
51 name: "sysprop_api_dump",
52 defaults: ["sysprop-defaults"],
53 srcs: ["ApiDumpMain.cpp"],
54}
55
Inseob Kim472fb632020-03-21 03:29:39 +090056cc_binary_host {
57 name: "sysprop_type_checker",
58 defaults: ["sysprop-defaults"],
59 srcs: ["TypeChecker.cpp", "TypeCheckerMain.cpp"],
60}
61
Inseob Kimade45e22018-08-29 19:08:35 +090062cc_test_host {
63 name: "sysprop_test",
64 defaults: ["sysprop-defaults"],
Inseob Kim900fbad2019-06-26 14:09:20 +090065 srcs: ["ApiChecker.cpp",
Inseob Kim472fb632020-03-21 03:29:39 +090066 "CppGen.cpp",
Inseob Kimade45e22018-08-29 19:08:35 +090067 "JavaGen.cpp",
Inseob Kim472fb632020-03-21 03:29:39 +090068 "TypeChecker.cpp",
Inseob Kimade45e22018-08-29 19:08:35 +090069 "tests/*.cpp"],
Nikita Ioffe1f060052020-09-03 02:25:02 +010070 whole_static_libs: ["com.android.sysprop.tests"],
Julien Desprez06b41022020-12-11 12:01:03 -080071 test_options: {
72 unit_test: true,
73 },
Inseob Kimade45e22018-08-29 19:08:35 +090074}
Inseob Kim38569c72019-07-30 18:36:28 +090075
76java_defaults {
77 name: "sysprop-library-stub-defaults",
78 srcs: [
Inseob Kim3f452c02020-03-31 13:41:19 +090079 "stub/**/*.java",
Inseob Kim38569c72019-07-30 18:36:28 +090080 ],
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}
Inseob Kim6b842c72020-10-20 16:35:15 +090095
96java_library {
97 name: "sysprop-library-stub-product",
98 defaults: ["sysprop-library-stub-defaults"],
99 product_specific: true,
100}