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.
426 lines
12 KiB
426 lines
12 KiB
// Copyright (C) 2018 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.
|
|
|
|
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
filegroup {
|
|
name: "libcarpowermanager_aidl",
|
|
srcs: [
|
|
"src/android/car/ICar.aidl",
|
|
"src/android/car/hardware/power/CarPowerPolicy.aidl",
|
|
"src/android/car/hardware/power/CarPowerPolicyFilter.aidl",
|
|
"src/android/car/hardware/power/ICarPower.aidl",
|
|
"src/android/car/hardware/power/ICarPowerPolicyListener.aidl",
|
|
"src/android/car/hardware/power/ICarPowerStateListener.aidl",
|
|
],
|
|
path: "src",
|
|
}
|
|
|
|
cc_library {
|
|
name: "libcarpowermanager",
|
|
vendor_available: true,
|
|
|
|
aidl: {
|
|
export_aidl_headers: true,
|
|
local_include_dirs: [
|
|
"src",
|
|
],
|
|
},
|
|
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wextra",
|
|
"-Wno-unused-parameter",
|
|
],
|
|
|
|
include_dirs: [
|
|
"packages/services/Car/car-lib/native/include",
|
|
],
|
|
|
|
shared_libs: [
|
|
"libbinder",
|
|
"liblog",
|
|
"libutils",
|
|
],
|
|
|
|
srcs: [
|
|
":libcarpowermanager_aidl",
|
|
"native/CarPowerManager/CarPowerManager.cpp",
|
|
"native/CarPowerManager/CarPowerPolicy.cpp",
|
|
"native/CarPowerManager/CarPowerPolicyFilter.cpp",
|
|
],
|
|
}
|
|
|
|
java_library {
|
|
name: "android.car.cluster.navigation",
|
|
proto: {
|
|
type: "lite",
|
|
},
|
|
static_libs: ["libprotobuf-java-lite"],
|
|
srcs: ["src/android/car/navigation/navigation_state.proto"]
|
|
}
|
|
|
|
// library to access settings from CarSettings
|
|
java_library {
|
|
name: "android.car.settings",
|
|
srcs: ["src/android/car/settings/CarSettings.java"]
|
|
}
|
|
|
|
// library to access common constants between carlibrary and system server.
|
|
java_library {
|
|
name: "com.android.car.internal.common",
|
|
srcs: [
|
|
"src/com/android/car/internal/common/**/*.java",
|
|
"src/com/android/car/internal/common/EventLogTags.logtags",
|
|
"src/com/android/car/internal/ExcludeFromCodeCoverageGeneratedReport.java",
|
|
],
|
|
}
|
|
|
|
java_library {
|
|
name: "android.car",
|
|
srcs: [
|
|
"src/**/*.java",
|
|
"src/**/*.aidl",
|
|
"src/com/android/car/internal/common/EventLogTags.logtags",
|
|
],
|
|
aidl: {
|
|
include_dirs: [
|
|
"system/bt/binder",
|
|
],
|
|
},
|
|
exclude_srcs: [
|
|
"src/android/car/storagemonitoring/IoStats.aidl",
|
|
"src/android/car/storagemonitoring/IoStatsEntry.aidl",
|
|
],
|
|
product_variables: {
|
|
pdk: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
installable: true,
|
|
}
|
|
|
|
stubs_defaults {
|
|
name: "android.car-docs-default",
|
|
srcs: [
|
|
"src/**/*.java",
|
|
],
|
|
libs: [
|
|
"android.car",
|
|
],
|
|
product_variables: {
|
|
pdk: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
}
|
|
|
|
genrule {
|
|
name: "android-car-last-released-api",
|
|
srcs: [
|
|
"api/released/*.txt",
|
|
],
|
|
cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-api.txt",
|
|
out: [
|
|
"last-released-api.txt",
|
|
],
|
|
}
|
|
|
|
genrule {
|
|
name: "android-car-last-released-system-api",
|
|
srcs: [
|
|
"api/system-released/*.txt",
|
|
],
|
|
cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-system-api.txt",
|
|
out: [
|
|
"last-released-system-api.txt",
|
|
],
|
|
}
|
|
|
|
droidstubs {
|
|
name: "android.car-stubs-docs",
|
|
defaults: ["android.car-docs-default"],
|
|
args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " +
|
|
"--hide-package com.android.internal ",
|
|
installable: false,
|
|
check_api: {
|
|
last_released: {
|
|
api_file: ":android-car-last-released-api",
|
|
removed_api_file: "api/removed.txt",
|
|
args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " +
|
|
" -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " +
|
|
" -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ",
|
|
},
|
|
current: {
|
|
api_file: "api/current.txt",
|
|
removed_api_file: "api/removed.txt",
|
|
args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " +
|
|
" -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " +
|
|
" -error 21 -error 23 -error 24 -error 25 -hide 113 ",
|
|
},
|
|
api_lint: {
|
|
enabled: true,
|
|
baseline_file: "api/lint-baseline.txt",
|
|
}
|
|
},
|
|
}
|
|
|
|
droidstubs {
|
|
name: "android.car-system-stubs-docs",
|
|
defaults: ["android.car-docs-default"],
|
|
// TODO(b/174572385): Remove CallbackInterface once this b/174572385 is fixed
|
|
args: "--hide CallbackInterface --hide UnavailableSymbol --hide HiddenSuperclass " +
|
|
"--no-docs --stub-packages android.car* " +
|
|
"--show-annotation android.annotation.SystemApi --hide-package com.android.internal ",
|
|
installable: false,
|
|
check_api: {
|
|
last_released: {
|
|
api_file: ":android-car-last-released-system-api",
|
|
removed_api_file: "api/system-removed.txt",
|
|
args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " +
|
|
" -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " +
|
|
" -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ",
|
|
},
|
|
current: {
|
|
api_file: "api/system-current.txt",
|
|
removed_api_file: "api/system-removed.txt",
|
|
args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " +
|
|
" -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " +
|
|
" -error 21 -error 23 -error 24 -error 25 -hide 113 ",
|
|
},
|
|
api_lint: {
|
|
enabled: true,
|
|
baseline_file: "api/system-lint-baseline.txt",
|
|
}
|
|
},
|
|
}
|
|
|
|
droidstubs {
|
|
name: "android.car-test-stubs-docs",
|
|
defaults: ["android.car-docs-default"],
|
|
args: "--hide HiddenSuperclass --hide UnavailableSymbol --no-docs --stub-packages android.car* " +
|
|
"--show-annotation android.annotation.TestApi ",
|
|
installable: false,
|
|
check_api: {
|
|
current: {
|
|
api_file: "api/test-current.txt",
|
|
removed_api_file: "api/test-removed.txt",
|
|
args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " +
|
|
" -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " +
|
|
" -error 21 -error 23 -error 24 -error 25 -hide 113 ",
|
|
},
|
|
},
|
|
}
|
|
|
|
droidstubs {
|
|
name: "android.car-stub-docs",
|
|
srcs: [
|
|
"src/**/*.java",
|
|
],
|
|
libs: [
|
|
"android.car",
|
|
],
|
|
api_filename: "api.txt",
|
|
args: "--hide HiddenSuperclass --hide UnavailableSymbol --no-docs --stub-packages android.car* ",
|
|
installable: false,
|
|
product_variables: {
|
|
pdk: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
}
|
|
|
|
// Generates stubs for API documentation.
|
|
droidstubs {
|
|
name: "car-doc-stubs",
|
|
srcs: [
|
|
"src/**/*.java",
|
|
],
|
|
create_doc_stubs: true,
|
|
annotations_enabled: true,
|
|
api_levels_annotations_enabled: true,
|
|
api_levels_jar_filename: "android.car.jar",
|
|
api_levels_annotations_dirs: [
|
|
"sdk-dir",
|
|
"api-versions-jars-dir",
|
|
],
|
|
previous_api: ":android-car-last-released-api",
|
|
merge_annotations_dirs: [
|
|
"metalava-manual",
|
|
],
|
|
arg_files: [
|
|
"AndroidManifest.xml",
|
|
],
|
|
// Add --verbose to print metalava details.
|
|
args: "--manifest $(location AndroidManifest.xml) " +
|
|
"--error UnhiddenSystemApi " +
|
|
"--hide RequiresPermission " +
|
|
"--hide CallbackInterface " +
|
|
"--hide MissingPermission " +
|
|
"--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
|
|
"--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
|
|
"--hide Todo --hide Typo ",
|
|
write_sdk_values: true,
|
|
}
|
|
|
|
// Generates API docs for go/devsite.
|
|
//
|
|
// How API docs are generated:
|
|
// source files -> (droidstubs/metalava) -> stub source files -> (droiddoc/doclava) -> docs
|
|
//
|
|
// The metalava conversion is done by droidstub module "car-doc-stubs".
|
|
//
|
|
// TODO(b/162958231): Remove "ds-car-docs" from build/soong/java/legacy_core_platform_api_usage.go.
|
|
droiddoc {
|
|
name: "ds-car-docs",
|
|
srcs: [
|
|
":car-doc-stubs",
|
|
],
|
|
libs: [
|
|
"stub-annotations",
|
|
"unsupportedappusage",
|
|
],
|
|
custom_template: "droiddoc-templates-sdk",
|
|
// These variables that are used in doclava templates.
|
|
hdf: [
|
|
"dac true",
|
|
"sdk.preview 0", // Not a preview version.
|
|
"sdk.version 31",
|
|
"android.whichdoc online",
|
|
"android.hasSamples false",
|
|
],
|
|
arg_files: [
|
|
"AndroidManifest.xml",
|
|
],
|
|
proofread_file: "ds-sdk-docs-proofrerad.txt",
|
|
// See doclava docs in https://github.com/tinks/doclava.
|
|
// See error numbers in external/doclava/src/com/google/doclava/Errors.java.
|
|
// TODO(b/163831343): Add -werror -lerror to catch bad javadocs
|
|
args: "-android -manifest $(location AndroidManifest.xml) -toroot / -devsite -yamlV2 -metalavaApiSince " +
|
|
"-hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
|
|
"-stubpackages android.car -dac_libraryroot android/car ",
|
|
}
|
|
|
|
java_library {
|
|
name: "android.car-stubs",
|
|
srcs: [
|
|
":android.car-stub-docs",
|
|
],
|
|
sdk_version: "current",
|
|
product_variables: {
|
|
pdk: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
installable: false,
|
|
dist: {
|
|
targets: ["dist_files"],
|
|
}
|
|
}
|
|
|
|
java_library {
|
|
name: "android.car-stubs-dex",
|
|
static_libs: ["android.car-stubs"],
|
|
sdk_version: "current",
|
|
product_variables: {
|
|
pdk: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
compile_dex: true,
|
|
}
|
|
|
|
java_library {
|
|
name: "android.car-system-stubs",
|
|
srcs: [
|
|
":android.car-system-stubs-docs",
|
|
],
|
|
sdk_version: "system_current",
|
|
product_variables: {
|
|
pdk: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
installable: false,
|
|
dist: {
|
|
targets: ["dist_files"],
|
|
}
|
|
}
|
|
|
|
java_library {
|
|
name: "android.car-system-stubs-dex",
|
|
static_libs: ["android.car-system-stubs"],
|
|
sdk_version: "system_current",
|
|
product_variables: {
|
|
pdk: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
compile_dex: true,
|
|
}
|
|
|
|
java_library {
|
|
name: "android.car-test-stubs",
|
|
srcs: [
|
|
":android.car-test-stubs-docs",
|
|
],
|
|
sdk_version: "test_current",
|
|
product_variables: {
|
|
pdk: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
installable: false,
|
|
}
|
|
|
|
java_library {
|
|
name: "android.car-test-stubs-dex",
|
|
static_libs: ["android.car-test-stubs"],
|
|
sdk_version: "test_current",
|
|
product_variables: {
|
|
pdk: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
compile_dex: true,
|
|
dist: {
|
|
targets: ["dist_files"],
|
|
}
|
|
}
|
|
|
|
// Export the api/system-current.txt file.
|
|
filegroup {
|
|
name: "car-api-system-current.txt",
|
|
visibility: [
|
|
"//cts/tests/signature/api",
|
|
],
|
|
srcs: [
|
|
"api/system-current.txt",
|
|
],
|
|
}
|
|
|
|
// Export the api/system-removed.txt file.
|
|
filegroup {
|
|
name: "car-api-system-removed.txt",
|
|
visibility: [
|
|
"//cts/tests/signature/api",
|
|
],
|
|
srcs: [
|
|
"api/system-removed.txt",
|
|
],
|
|
}
|