You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
171 lines
4.4 KiB
171 lines
4.4 KiB
4 months ago
|
// Copyright (C) 2019 The Android Open Source Project
|
||
|
//
|
||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
// you may not use this file except in compliance with the License.
|
||
|
// You may obtain a copy of the License at
|
||
|
//
|
||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||
|
//
|
||
|
// Unless required by applicable law or agreed to in writing, software
|
||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
// See the License for the specific language governing permissions and
|
||
|
// limitations under the License.
|
||
|
//
|
||
|
//
|
||
|
|
||
|
// Build the Car service.
|
||
|
|
||
|
package {
|
||
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
||
|
}
|
||
|
|
||
|
genrule {
|
||
|
name: "statslog-Car-java-gen",
|
||
|
tools: ["stats-log-api-gen"],
|
||
|
cmd: "$(location stats-log-api-gen) --java $(out) --module car --javaPackage com.android.car"
|
||
|
+ " --javaClass CarStatsLog",
|
||
|
out: ["com/android/car/CarStatsLog.java"],
|
||
|
}
|
||
|
|
||
|
car_service_sources = [
|
||
|
"src/**/*.java",
|
||
|
":statslog-Car-java-gen",
|
||
|
]
|
||
|
|
||
|
common_lib_deps = [
|
||
|
"android.car.cluster.navigation",
|
||
|
"android.car.userlib",
|
||
|
"android.car.watchdoglib",
|
||
|
"android.frameworks.automotive.powerpolicy.internal-java",
|
||
|
"android.hidl.base-V1.0-java",
|
||
|
"android.hardware.automotive.audiocontrol-V1.0-java",
|
||
|
"android.hardware.automotive.audiocontrol-V2.0-java",
|
||
|
"android.hardware.automotive.audiocontrol-V1-java",
|
||
|
"android.hardware.automotive.vehicle-V2.0-java",
|
||
|
"android.hardware.health-V1.0-java",
|
||
|
"android.hardware.health-V2.0-java",
|
||
|
"android.hardware.automotive.occupant_awareness-V1-java",
|
||
|
"vehicle-hal-support-lib",
|
||
|
"car-systemtest",
|
||
|
"com.android.car.procfsinspector-client",
|
||
|
"blestream-protos",
|
||
|
"SettingsLib",
|
||
|
"androidx.preference_preference",
|
||
|
// TODO(b/171603586): remove this after moving NewUserDisclaimerActivity
|
||
|
// to CarSettings
|
||
|
"car-admin-ui-lib",
|
||
|
"Slogf",
|
||
|
"cartelemetry-protos",
|
||
|
]
|
||
|
|
||
|
android_app {
|
||
|
name: "CarService",
|
||
|
|
||
|
srcs: car_service_sources,
|
||
|
|
||
|
resource_dirs: ["res"],
|
||
|
|
||
|
platform_apis: true,
|
||
|
|
||
|
// Each update should be signed by OEMs
|
||
|
certificate: "platform",
|
||
|
privileged: true,
|
||
|
|
||
|
optimize: {
|
||
|
proguard_flags_files: ["proguard.flags"],
|
||
|
enabled: false,
|
||
|
},
|
||
|
|
||
|
libs: ["android.car"],
|
||
|
|
||
|
static_libs: common_lib_deps + [
|
||
|
"com.android.car.internal.system",
|
||
|
],
|
||
|
|
||
|
jni_libs: [
|
||
|
"libcarservicejni",
|
||
|
"libscriptexecutorjni",
|
||
|
],
|
||
|
|
||
|
required: ["allowed_privapp_com.android.car"],
|
||
|
|
||
|
// Disable build in PDK, missing aidl import breaks build
|
||
|
product_variables: {
|
||
|
pdk: {
|
||
|
enabled: false,
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
java_library {
|
||
|
|
||
|
name: "car-service-common-util-static-lib",
|
||
|
|
||
|
srcs: [
|
||
|
"src/com/android/car/CarServiceBase.java",
|
||
|
"src/com/android/car/CarServiceUtils.java",
|
||
|
"src/com/android/car/CarLog.java",
|
||
|
"src/com/android/car/Utils.java",
|
||
|
],
|
||
|
|
||
|
static_libs: [
|
||
|
"com.android.car.internal.common",
|
||
|
],
|
||
|
|
||
|
product_variables: {
|
||
|
pdk: {
|
||
|
enabled: false,
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
//####################################################################################
|
||
|
// Build a static library to help mocking various car services in testing. This is meant to be used
|
||
|
// for internal unit tests around the car service.
|
||
|
//####################################################################################
|
||
|
android_library {
|
||
|
name: "car-service-test-static-lib",
|
||
|
|
||
|
srcs: car_service_sources,
|
||
|
|
||
|
resource_dirs: ["res"],
|
||
|
|
||
|
libs: [
|
||
|
"android.car",
|
||
|
"car-frameworks-service",
|
||
|
],
|
||
|
|
||
|
static_libs: common_lib_deps,
|
||
|
|
||
|
product_variables: {
|
||
|
pdk: {
|
||
|
enabled: false,
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
//####################################################################################
|
||
|
// Build a library to help generate a testing library for external apps.
|
||
|
// We do not want to use statically linked libraries, as this will bloat the output jar with classes
|
||
|
// that can conflict with the user's environment.
|
||
|
//####################################################################################
|
||
|
android_library {
|
||
|
name: "car-service-test-lib",
|
||
|
|
||
|
srcs: car_service_sources,
|
||
|
|
||
|
resource_dirs: ["res"],
|
||
|
|
||
|
libs: common_lib_deps + [
|
||
|
"android.car",
|
||
|
"car-frameworks-service",
|
||
|
],
|
||
|
|
||
|
product_variables: {
|
||
|
pdk: {
|
||
|
enabled: false,
|
||
|
},
|
||
|
},
|
||
|
}
|