Dan Harms | 25fbf1b | 2019-07-25 16:09:17 -0700 | [diff] [blame] | 1 | // Copyright (C) 2019 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 | // |
| 15 | // |
| 16 | |
| 17 | // Build the Car service. |
| 18 | |
Bob Badour | 4da7d22 | 2021-02-22 16:14:07 -0800 | [diff] [blame] | 19 | package { |
| 20 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 21 | } |
| 22 | |
Muhammad Qureshi | 94524cd | 2020-01-25 23:47:38 -0800 | [diff] [blame] | 23 | genrule { |
| 24 | name: "statslog-Car-java-gen", |
| 25 | tools: ["stats-log-api-gen"], |
| 26 | cmd: "$(location stats-log-api-gen) --java $(out) --module car --javaPackage com.android.car" |
| 27 | + " --javaClass CarStatsLog", |
| 28 | out: ["com/android/car/CarStatsLog.java"], |
| 29 | } |
| 30 | |
| 31 | car_service_sources = [ |
Max Dashouk | 9912ac3 | 2021-08-13 17:54:51 +0000 | [diff] [blame] | 32 | ":iscriptexecutor_aidl", |
Muhammad Qureshi | 94524cd | 2020-01-25 23:47:38 -0800 | [diff] [blame] | 33 | "src/**/*.java", |
| 34 | ":statslog-Car-java-gen", |
| 35 | ] |
Dan Harms | 25fbf1b | 2019-07-25 16:09:17 -0700 | [diff] [blame] | 36 | |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 37 | common_lib_deps = [ |
Zhomart Mukhamejanov | fcfe494 | 2021-07-08 09:28:55 -0700 | [diff] [blame] | 38 | "android.automotive.telemetry.internal-java", // ICarTelemetryInternal |
Yuncheol Heo | 3e094c5 | 2021-05-03 11:15:17 -0700 | [diff] [blame] | 39 | "android.car.cluster.navigation", |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 40 | "android.car.userlib", |
Eric Jeong | 6df075f | 2020-03-11 16:12:23 -0700 | [diff] [blame] | 41 | "android.car.watchdoglib", |
Eric Jeong | 0d3bb4f | 2020-11-06 11:31:45 -0800 | [diff] [blame] | 42 | "android.frameworks.automotive.powerpolicy.internal-java", |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 43 | "android.hidl.base-V1.0-java", |
| 44 | "android.hardware.automotive.audiocontrol-V1.0-java", |
Hayden Gomes | d29c8db | 2020-03-09 13:47:28 -0700 | [diff] [blame] | 45 | "android.hardware.automotive.audiocontrol-V2.0-java", |
Jeongik Cha | d589dc0 | 2021-01-28 00:49:50 +0900 | [diff] [blame] | 46 | "android.hardware.automotive.audiocontrol-V1-java", |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 47 | "android.hardware.automotive.vehicle-V2.0-java", |
| 48 | "android.hardware.health-V1.0-java", |
| 49 | "android.hardware.health-V2.0-java", |
Jeongik Cha | d589dc0 | 2021-01-28 00:49:50 +0900 | [diff] [blame] | 50 | "android.hardware.automotive.occupant_awareness-V1-java", |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 51 | "vehicle-hal-support-lib", |
| 52 | "car-systemtest", |
| 53 | "com.android.car.procfsinspector-client", |
| 54 | "blestream-protos", |
| 55 | "SettingsLib", |
| 56 | "androidx.preference_preference", |
Yan Zhu | fb764ac | 2021-02-19 22:20:52 -0800 | [diff] [blame] | 57 | // TODO(b/171603586): remove this after moving NewUserDisclaimerActivity |
| 58 | // to CarSettings |
Felipe Leme | 8725a2f | 2020-12-09 16:04:51 -0800 | [diff] [blame] | 59 | "car-admin-ui-lib", |
Felipe Leme | 701b043 | 2021-03-24 16:25:31 -0700 | [diff] [blame] | 60 | "Slogf", |
Max Dashouk | ff9ffbc | 2021-02-16 11:36:39 -0800 | [diff] [blame] | 61 | "cartelemetry-protos", |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 62 | ] |
| 63 | |
Dan Harms | 25fbf1b | 2019-07-25 16:09:17 -0700 | [diff] [blame] | 64 | android_app { |
| 65 | name: "CarService", |
| 66 | |
| 67 | srcs: car_service_sources, |
| 68 | |
| 69 | resource_dirs: ["res"], |
| 70 | |
| 71 | platform_apis: true, |
| 72 | |
| 73 | // Each update should be signed by OEMs |
| 74 | certificate: "platform", |
| 75 | privileged: true, |
| 76 | |
| 77 | optimize: { |
| 78 | proguard_flags_files: ["proguard.flags"], |
| 79 | enabled: false, |
| 80 | }, |
| 81 | |
| 82 | libs: ["android.car"], |
| 83 | |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 84 | static_libs: common_lib_deps + [ |
Mayank Garg | 94f3eb9 | 2020-08-12 12:38:58 -0700 | [diff] [blame] | 85 | "com.android.car.internal.system", |
Dan Harms | 25fbf1b | 2019-07-25 16:09:17 -0700 | [diff] [blame] | 86 | ], |
| 87 | |
Max Dashouk | 2c013db | 2021-06-30 17:43:54 +0000 | [diff] [blame] | 88 | jni_libs: [ |
| 89 | "libcarservicejni", |
Max Dashouk | 2c013db | 2021-06-30 17:43:54 +0000 | [diff] [blame] | 90 | ], |
Changyeon Jo | c882f7a | 2021-03-09 08:41:41 -0800 | [diff] [blame] | 91 | |
Max Dashouk | dafdd22 | 2021-08-20 10:42:25 -0700 | [diff] [blame] | 92 | aidl: { |
| 93 | include_dirs: [ |
| 94 | "frameworks/native/aidl/binder", // For PersistableBundle.aidl |
| 95 | ], |
| 96 | }, |
| 97 | |
Yan Zhu | ca7c459 | 2020-08-14 10:05:23 -0700 | [diff] [blame] | 98 | required: ["allowed_privapp_com.android.car"], |
Dan Harms | 25fbf1b | 2019-07-25 16:09:17 -0700 | [diff] [blame] | 99 | |
| 100 | // Disable build in PDK, missing aidl import breaks build |
| 101 | product_variables: { |
| 102 | pdk: { |
| 103 | enabled: false, |
| 104 | }, |
| 105 | }, |
| 106 | } |
| 107 | |
Keun young Park | 9a91efb | 2019-11-15 18:10:47 -0800 | [diff] [blame] | 108 | java_library { |
| 109 | |
| 110 | name: "car-service-common-util-static-lib", |
| 111 | |
| 112 | srcs: [ |
| 113 | "src/com/android/car/CarServiceBase.java", |
| 114 | "src/com/android/car/CarServiceUtils.java", |
| 115 | "src/com/android/car/CarLog.java", |
Jordan Jozwiak | 9789ac5 | 2019-12-06 16:52:26 -0800 | [diff] [blame] | 116 | "src/com/android/car/Utils.java", |
Keun young Park | 9a91efb | 2019-11-15 18:10:47 -0800 | [diff] [blame] | 117 | ], |
| 118 | |
bkchoi | 5107653 | 2021-06-14 14:35:01 -0700 | [diff] [blame] | 119 | static_libs: [ |
| 120 | "com.android.car.internal.common", |
| 121 | ], |
| 122 | |
Keun young Park | 9a91efb | 2019-11-15 18:10:47 -0800 | [diff] [blame] | 123 | product_variables: { |
| 124 | pdk: { |
| 125 | enabled: false, |
| 126 | }, |
| 127 | }, |
| 128 | } |
| 129 | |
Dan Harms | 25fbf1b | 2019-07-25 16:09:17 -0700 | [diff] [blame] | 130 | //#################################################################################### |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 131 | // Build a static library to help mocking various car services in testing. This is meant to be used |
| 132 | // for internal unit tests around the car service. |
Dan Harms | 25fbf1b | 2019-07-25 16:09:17 -0700 | [diff] [blame] | 133 | //#################################################################################### |
| 134 | android_library { |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 135 | name: "car-service-test-static-lib", |
Dan Harms | 25fbf1b | 2019-07-25 16:09:17 -0700 | [diff] [blame] | 136 | |
| 137 | srcs: car_service_sources, |
| 138 | |
| 139 | resource_dirs: ["res"], |
| 140 | |
| 141 | libs: [ |
| 142 | "android.car", |
| 143 | "car-frameworks-service", |
| 144 | ], |
| 145 | |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 146 | static_libs: common_lib_deps, |
| 147 | |
Max Dashouk | dafdd22 | 2021-08-20 10:42:25 -0700 | [diff] [blame] | 148 | aidl: { |
| 149 | include_dirs: [ |
| 150 | "frameworks/native/aidl/binder", // For PersistableBundle.aidl |
| 151 | ], |
| 152 | }, |
| 153 | |
tadvana | f7746cd | 2019-10-04 16:02:56 -0700 | [diff] [blame] | 154 | product_variables: { |
| 155 | pdk: { |
| 156 | enabled: false, |
| 157 | }, |
| 158 | }, |
| 159 | } |
| 160 | |
| 161 | //#################################################################################### |
| 162 | // Build a library to help generate a testing library for external apps. |
| 163 | // We do not want to use statically linked libraries, as this will bloat the output jar with classes |
| 164 | // that can conflict with the user's environment. |
| 165 | //#################################################################################### |
| 166 | android_library { |
| 167 | name: "car-service-test-lib", |
| 168 | |
| 169 | srcs: car_service_sources, |
| 170 | |
| 171 | resource_dirs: ["res"], |
| 172 | |
| 173 | libs: common_lib_deps + [ |
| 174 | "android.car", |
| 175 | "car-frameworks-service", |
Dan Harms | 25fbf1b | 2019-07-25 16:09:17 -0700 | [diff] [blame] | 176 | ], |
| 177 | |
Max Dashouk | dafdd22 | 2021-08-20 10:42:25 -0700 | [diff] [blame] | 178 | aidl: { |
| 179 | include_dirs: [ |
| 180 | "frameworks/native/aidl/binder", // For PersistableBundle.aidl |
| 181 | ], |
| 182 | }, |
| 183 | |
Dan Harms | 25fbf1b | 2019-07-25 16:09:17 -0700 | [diff] [blame] | 184 | product_variables: { |
| 185 | pdk: { |
| 186 | enabled: false, |
| 187 | }, |
| 188 | }, |
| 189 | } |
Max Dashouk | 9912ac3 | 2021-08-13 17:54:51 +0000 | [diff] [blame] | 190 | |
| 191 | filegroup { |
| 192 | name: "iscriptexecutor_aidl", |
| 193 | srcs: [ |
| 194 | "src/com/android/car/telemetry/scriptexecutorinterface/IScriptExecutor.aidl", |
| 195 | "src/com/android/car/telemetry/scriptexecutorinterface/IScriptExecutorListener.aidl", |
| 196 | ], |
| 197 | path: "src", |
| 198 | } |