blob: fe6d342f51272e45fabdd16e07682cfa40a7d9ee [file] [log] [blame]
Yabin Huang59237eb2020-02-19 17:44:36 -08001// Copyright (C) 2020 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badourc2812712021-02-12 18:11:11 -080015package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
Danny Epsteinad072472021-04-09 17:09:55 -070019filegroup {
20 name: "rotary-service-proto-source",
21 srcs: [
22 "proto/car_rotary_controller.proto",
23 ],
24}
Vinh Tran03d20f82022-06-08 01:12:51 -040025
26java_library {
Danny Epsteinad072472021-04-09 17:09:55 -070027 name: "rotary-service-javastream-protos",
Vinh Tran03d20f82022-06-08 01:12:51 -040028 proto: {
29 type: "stream",
30 },
31 srcs: [":rotary-service-proto-source"],
32 installable: false,
33 platform_apis: true,
Danny Epsteinad072472021-04-09 17:09:55 -070034}
35
Yabin Huang59237eb2020-02-19 17:44:36 -080036android_app {
37 name: "CarRotaryController",
Danny Epsteinad072472021-04-09 17:09:55 -070038 srcs: [
39 "src/**/*.java",
Danny Epsteinad072472021-04-09 17:09:55 -070040 ],
Yabin Huang59237eb2020-02-19 17:44:36 -080041 resource_dirs: ["res"],
Yabin Huang40917502020-03-31 11:30:17 -070042
Danny Epstein346b25c2021-03-05 10:28:23 -080043 // This app uses allowlisted privileged permissions.
44 required: ["allowed_privapp_com.android.car.rotary"],
45
Yabin Huang40917502020-03-31 11:30:17 -070046 // Because it uses a platform API (CarInputManager).
47 platform_apis: true,
48
kanantac9a2832020-10-30 16:46:40 -070049 // This app should be platform signed because it requires
50 // android.car.permission.CAR_MONITOR_INPUT permission, which is of type "signature".
Yabin Huang40917502020-03-31 11:30:17 -070051 certificate: "platform",
52
Danny Epstein346b25c2021-03-05 10:28:23 -080053 // This app uses allowlisted privileged permissions.
54 privileged: true,
55
Yabin Huang59237eb2020-02-19 17:44:36 -080056 optimize: {
57 enabled: false,
58 },
59 dex_preopt: {
60 enabled: false,
61 },
Yabin Huang40917502020-03-31 11:30:17 -070062 libs: [
Yabin Huang5ae09a52021-09-09 17:59:42 -070063 "android.car-system-stubs",
Yabin Huang40917502020-03-31 11:30:17 -070064 ],
Yabin Huang59237eb2020-02-19 17:44:36 -080065 static_libs: [
66 "car-ui-lib",
Vinh Tran03d20f82022-06-08 01:12:51 -040067 "rotary-service-javastream-protos",
Yabin Huang59237eb2020-02-19 17:44:36 -080068 ],
69 product_variables: {
70 pdk: {
71 enabled: false,
72 },
73 },
74}
Heemin Seog5343a0f2020-12-11 20:20:39 -080075
76android_library {
77 name: "CarRotaryControllerForUnitTesting",
78
79 manifest: "tests/unit/AndroidManifest.xml",
80
Danny Epsteinad072472021-04-09 17:09:55 -070081 srcs: [
82 "src/**/*.java",
Danny Epsteinad072472021-04-09 17:09:55 -070083 ],
Heemin Seog5343a0f2020-12-11 20:20:39 -080084
85 resource_dirs: [
Heemin Seog6e174b12020-12-23 14:57:56 -080086 "tests/unit/res",
Heemin Seog5343a0f2020-12-11 20:20:39 -080087 "res",
88 ],
89
90 platform_apis: true,
91
92 optimize: {
93 enabled: false,
94 },
95 dex_preopt: {
96 enabled: false,
97 },
98 libs: [
Yabin Huang5ae09a52021-09-09 17:59:42 -070099 "android.car-system-stubs",
Heemin Seog5343a0f2020-12-11 20:20:39 -0800100 ],
101 static_libs: [
102 "car-ui-lib",
Vinh Tran03d20f82022-06-08 01:12:51 -0400103 "rotary-service-javastream-protos",
Heemin Seog5343a0f2020-12-11 20:20:39 -0800104 ],
105 product_variables: {
106 pdk: {
107 enabled: false,
108 },
109 },
110
111 aaptflags: ["--extra-packages com.android.car.rotary"],
112}