206 lines
5.6 KiB
Plaintext
206 lines
5.6 KiB
Plaintext
|
// 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"],
|
||
|
}
|
||
|
|
||
|
java_defaults {
|
||
|
name: "carservice-updatable-min-java-defaults",
|
||
|
|
||
|
srcs: [
|
||
|
// add full source for all codes under p/s/Car to reduce unnecessary library allow listing.
|
||
|
":android.car.cluster.navigation-src",
|
||
|
":android.car.watchdoglib-src",
|
||
|
":cartelemetry-cardata-proto-srcs",
|
||
|
":cartelemetryservice-proto-srcs",
|
||
|
":com.android.car.procfsinspector-client-src",
|
||
|
":statslog-Car-java-gen",
|
||
|
":iscriptexecutor_aidl",
|
||
|
"proto/**/*.proto",
|
||
|
"src/**/*.java",
|
||
|
],
|
||
|
|
||
|
aidl: {
|
||
|
include_dirs: [
|
||
|
"packages/services/Car/procfs-inspector/client/src",
|
||
|
],
|
||
|
},
|
||
|
|
||
|
resource_dirs: ["res"],
|
||
|
|
||
|
// Resource is still com.android.car.R
|
||
|
aaptflags: [
|
||
|
"--custom-package com.android.car",
|
||
|
],
|
||
|
|
||
|
libs: [
|
||
|
"android.car-module.impl",
|
||
|
"android.car.builtin",
|
||
|
"framework-annotations-lib",
|
||
|
"framework-bluetooth",
|
||
|
"framework-connectivity",
|
||
|
"framework-connectivity-t.stubs.module_lib",
|
||
|
"framework-statsd",
|
||
|
"framework-tethering",
|
||
|
"framework-wifi",
|
||
|
"modules-utils-os",
|
||
|
"modules-utils-preconditions",
|
||
|
"modules-utils-shell-command-handler",
|
||
|
],
|
||
|
|
||
|
static_libs: [
|
||
|
"android.automotive.telemetry.internal-V2-java", // ICarTelemetryInternal
|
||
|
"android.automotive.watchdog.internal-V2-java",
|
||
|
"android.frameworks.automotive.powerpolicy.internal-V1-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-V2-java",
|
||
|
"android.hardware.automotive.vehicle-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",
|
||
|
],
|
||
|
|
||
|
proto: {
|
||
|
type: "lite",
|
||
|
},
|
||
|
|
||
|
optimize: {
|
||
|
proguard_flags_files: ["proguard.flags"],
|
||
|
enabled: false,
|
||
|
},
|
||
|
|
||
|
// Disable build in PDK, missing aidl import breaks build
|
||
|
product_variables: {
|
||
|
pdk: {
|
||
|
enabled: false,
|
||
|
},
|
||
|
},
|
||
|
|
||
|
sdk_version: "module_current",
|
||
|
platform_apis: false,
|
||
|
}
|
||
|
|
||
|
java_defaults {
|
||
|
name: "carservice-updatable-java-defaults",
|
||
|
|
||
|
visibility: [
|
||
|
"//packages/services/Car:__subpackages__",
|
||
|
],
|
||
|
|
||
|
defaults: [ "carservice-updatable-min-java-defaults" ],
|
||
|
|
||
|
min_sdk_version: "33",
|
||
|
}
|
||
|
|
||
|
// Non-module build
|
||
|
android_app {
|
||
|
name: "CarServiceUpdatableNonModule",
|
||
|
|
||
|
defaults: ["carservice-updatable-java-defaults"],
|
||
|
privileged: true,
|
||
|
|
||
|
required: ["allowed_privapp_com.android.car"],
|
||
|
}
|
||
|
|
||
|
// Added to car.framework module
|
||
|
android_app {
|
||
|
name: "CarServiceUpdatable",
|
||
|
|
||
|
defaults: ["carservice-updatable-java-defaults"],
|
||
|
privileged: true,
|
||
|
|
||
|
apex_available: ["com.android.car.framework"],
|
||
|
}
|
||
|
|
||
|
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/util/TransitionLog.java",
|
||
|
],
|
||
|
|
||
|
libs: [
|
||
|
"android.car.builtin",
|
||
|
"android.car",
|
||
|
],
|
||
|
|
||
|
static_libs: [
|
||
|
"android.hardware.automotive.vehicle-V1-java",
|
||
|
"android.hardware.automotive.vehicle-V2.0-java",
|
||
|
],
|
||
|
|
||
|
product_variables: {
|
||
|
pdk: {
|
||
|
enabled: false,
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
// Minimum code shared with carservice builtin.
|
||
|
// Be careful with what is added here as it takes double space.
|
||
|
// Also static instance sharing will not work.
|
||
|
java_library {
|
||
|
name: "car-service-lib-for-builtin",
|
||
|
|
||
|
srcs: [
|
||
|
"src/com/android/car/CarLog.java",
|
||
|
],
|
||
|
|
||
|
libs: [
|
||
|
"android.car",
|
||
|
],
|
||
|
}
|
||
|
|
||
|
//####################################################################################
|
||
|
// 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",
|
||
|
|
||
|
defaults: ["carservice-updatable-min-java-defaults"],
|
||
|
|
||
|
manifest: "EmptyAndroidManifest.xml"
|
||
|
}
|
||
|
|
||
|
filegroup {
|
||
|
name: "iscriptexecutor_aidl",
|
||
|
srcs: [
|
||
|
"src/com/android/car/telemetry/scriptexecutorinterface/BundleList.aidl",
|
||
|
"src/com/android/car/telemetry/scriptexecutorinterface/IScriptExecutor.aidl",
|
||
|
"src/com/android/car/telemetry/scriptexecutorinterface/IScriptExecutorListener.aidl",
|
||
|
],
|
||
|
path: "src",
|
||
|
}
|