// 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_team: "trendy_team_aaos_framework", default_applicable_licenses: ["Android-Apache-2.0"], } filegroup { name: "android.car.cluster.navigation-src", srcs: ["src/android/car/navigation/navigation_state.proto"], visibility: [ "//packages/services/Car/car-lib", "//packages/services/Car/service", ], } // Public protos for CarTelemetryManager clients. filegroup { name: "cartelemetryservice-proto-srcs", srcs: [ "src/android/car/telemetry/telemetry.proto", ], } java_library { name: "android.car.cluster.navigation", proto: { type: "lite", }, sdk_version: "module_current", min_sdk_version: "31", apex_available: [ "//apex_available:platform", "com.android.car.framework", ], static_libs: ["libprotobuf-java-lite"], srcs: ["src/android/car/navigation/navigation_state.proto"], } filegroup { name: "android.car-full-src", srcs: [ "src/**/*.java", "src/**/*.aidl", ], visibility: [ "//packages/services/Car/car-lib", "//packages/services/Car/car-lib-module", "//packages/services/Car/tests/CarLibUnitTest:__subpackages__", ], } java_defaults { name: "android.car-defaults", defaults: [ "car-framework-aconfig-libraries", ], srcs: [ ":android.car-full-src", ], aidl: { include_dirs: [ "packages/modules/Bluetooth/framework/aidl-export", ], }, libs: [ "android.car.builtin", "framework-annotations-lib", "framework-wifi", "framework-bluetooth", "framework-location", "modules-utils-preconditions", ], installable: true, // TODO(b/288271411): enable it when car mainline module is supported // min_sdk_version: "33", sdk_version: "module_current", } java_library { name: "android.car", defaults: [ "android.car-defaults", ], static_libs: [ "com.android.car.internal.dep", ], } // TODO(b/248635421): these annotations are part of android.car, but // they're still need on ATS java_library_static { name: "android.car.annotations.compile-only", srcs: [ "src/android/car/annotation/*", "src/android/car/ApiVersion.java", "src/android/car/CarVersion.java", "src/android/car/PlatformVersion.java", ], } stubs_defaults { name: "android.car-docs-default", srcs: [ "src/**/*.java", ], libs: [ "android.car", ], } droidstubs { name: "android.car-stubs-docs", defaults: ["android.car-docs-default"], args: "--hide UnavailableSymbol --hide HiddenSuperclass --stub-packages android.car* " + "--hide-package com.android.internal --hide-package com.android.car.internal " + "--error UnflaggedApi", installable: false, check_api: { last_released: { api_file: ":android.car.api.combined.public.latest", removed_api_file: ":android.car-removed.api.combined.public.latest", }, current: { api_file: "api/current.txt", removed_api_file: "api/removed.txt", }, api_lint: { enabled: true, new_since: ":android.car.api.combined.public.latest", 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 " + "--stub-packages android.car* " + "--show-annotation android.annotation.SystemApi --hide-package com.android.internal " + "--hide-package com.android.car.internal --error UnflaggedApi", installable: false, check_api: { last_released: { api_file: ":android.car.api.combined.system.latest", removed_api_file: ":android.car-removed.api.combined.system.latest", }, current: { api_file: "api/system-current.txt", removed_api_file: "api/system-removed.txt", }, api_lint: { enabled: true, new_since: ":android.car.api.combined.system.latest", baseline_file: "api/system-lint-baseline.txt", }, }, } droidstubs { name: "android.car-test-stubs-docs", defaults: ["android.car-docs-default"], args: "--hide HiddenSuperclass --hide UnavailableSymbol --stub-packages android.car* " + "--show-annotation android.annotation.TestApi " + "--show-annotation android.annotation.SystemApi", installable: false, check_api: { current: { api_file: "api/test-current.txt", removed_api_file: "api/test-removed.txt", }, }, } droidstubs { name: "android.car-stub-docs", srcs: [ "src/**/*.java", ], libs: [ "android.car", ], api_filename: "api.txt", args: "--hide HiddenSuperclass --hide UnavailableSymbol --stub-packages android.car* ", installable: 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.api.combined.public.latest", 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 ", 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_defaults { name: "android.car-stubs.jar_defaults", java_version: "1.8", installable: false, } java_defaults { name: "android.car-stubs-dex.jar_defaults", compile_dex: true, } java_library { name: "android.car-stubs", defaults: ["android.car-stubs.jar_defaults"], srcs: [ ":android.car-stub-docs", ], sdk_version: "current", dist: { targets: ["dist_files"], }, } java_library { name: "android.car-stubs-dex", defaults: ["android.car-stubs-dex.jar_defaults"], static_libs: ["android.car-stubs"], sdk_version: "current", } java_library { name: "android.car-system-stubs", defaults: ["android.car-stubs.jar_defaults"], srcs: [ ":android.car-system-stubs-docs", ], sdk_version: "system_current", dist: { targets: ["dist_files"], }, } java_library { name: "android.car-system-stubs-dex", defaults: ["android.car-stubs-dex.jar_defaults"], static_libs: ["android.car-system-stubs"], sdk_version: "system_current", } java_library { name: "android.car-test-stubs", defaults: ["android.car-stubs.jar_defaults"], srcs: [ ":android.car-test-stubs-docs", ], sdk_version: "test_current", } java_library { name: "android.car-test-stubs-dex", defaults: ["android.car-stubs-dex.jar_defaults"], static_libs: ["android.car-test-stubs"], sdk_version: "test_current", 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", ], }