• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19filegroup {
20    name: "rotary-service-proto-source",
21    srcs: [
22        "proto/car_rotary_controller.proto",
23    ],
24}
25
26java_library {
27    name: "rotary-service-javastream-protos",
28    proto: {
29        type: "stream",
30    },
31    srcs: [":rotary-service-proto-source"],
32    installable: false,
33    platform_apis: true,
34}
35
36android_app {
37    name: "CarRotaryController",
38    srcs: [
39        "src/**/*.java",
40    ],
41    resource_dirs: ["res"],
42
43    // This app uses allowlisted privileged permissions.
44    required: ["allowed_privapp_com.android.car.rotary"],
45
46    // Because it uses a platform API (CarInputManager).
47    platform_apis: true,
48
49    // This app should be platform signed because it requires
50    // android.car.permission.CAR_MONITOR_INPUT permission, which is of type "signature".
51    certificate: "platform",
52
53    // This app uses allowlisted privileged permissions.
54    privileged: true,
55
56    optimize: {
57        enabled: false,
58    },
59    dex_preopt: {
60        enabled: false,
61    },
62    libs: [
63        "android.car-system-stubs",
64    ],
65    static_libs: [
66        "car-ui-lib",
67        "rotary-service-javastream-protos",
68    ],
69    product_variables: {
70        pdk: {
71            enabled: false,
72        },
73    },
74}
75
76android_library {
77    name: "CarRotaryControllerForUnitTesting",
78
79    manifest: "tests/unit/AndroidManifest.xml",
80
81    srcs: [
82        "src/**/*.java",
83    ],
84
85    resource_dirs: [
86        "tests/unit/res",
87        "res",
88    ],
89
90    platform_apis: true,
91
92    optimize: {
93        enabled: false,
94    },
95    dex_preopt: {
96        enabled: false,
97    },
98    libs: [
99        "android.car-system-stubs",
100    ],
101    static_libs: [
102        "car-ui-lib",
103        "rotary-service-javastream-protos",
104    ],
105    product_variables: {
106        pdk: {
107            enabled: false,
108        },
109    },
110
111    aaptflags: ["--extra-packages com.android.car.rotary"],
112}
113