1// Copyright (C) 2023 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 15package { 16 default_team: "trendy_team_fwk_telephony", 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20android_test { 21 name: "CtsTelecomCujTestCases", 22 defaults: ["cts_defaults"], 23 static_libs: [ 24 "compatibility-device-util-axt", 25 "ctstestrunner-axt", 26 "androidx.test.core", 27 "androidx.test.rules", 28 "TelecomTestAppUtilsLib", 29 "telecom_flags_core_java_lib", 30 "telephony_flags_core_java_lib", 31 "flag-junit", 32 "android.media.audio-aconfig-java", 33 ], 34 libs: [ 35 "android.test.base.stubs.test", 36 "android.test.runner.stubs.test", 37 ], 38 srcs: [ 39 "src/**/*.java", 40 "aidl/**/I*.aidl", 41 ], 42 sdk_version: "test_current", 43 min_sdk_version: "21", 44 // Tag this module as a cts test artifact 45 test_suites: [ 46 "cts", 47 "general-tests", 48 ], 49 data: [ 50 ":ManagedConnectionServiceApp", 51 ":TransactionalVoipAppMain", 52 ":TransactionalVoipAppClone", 53 ":ConnectionServiceVoipAppMain", 54 ":ConnectionServiceVoipAppClone", 55 ], 56 per_testcase_directory: true, 57} 58 59// Generates stubs for test documentation. 60droidstubs { 61 name: "telecom-cuj-doc-stubs", 62 srcs: [ 63 "src/**/*.java", 64 ], 65 create_doc_stubs: true, 66 annotations_enabled: true, 67 merge_annotations_dirs: [ 68 "metalava-manual", 69 ], 70 arg_files: [ 71 "AndroidManifest.xml", 72 ], 73 // Add --verbose to print metalava details. 74 args: "--manifest $(location AndroidManifest.xml) " + 75 "--error UnhiddenSystemApi " + 76 "--hide RequiresPermission " + 77 "--hide CallbackInterface " + 78 "--hide MissingPermission " + 79 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " + 80 "--hide SdkConstant --hide HiddenTypeParameter " + 81 "--hide Todo ", 82 write_sdk_values: true, 83} 84 85// Generates API docs for go/devsite. 86// 87// How API docs are generated: 88// source files -> (droidstubs/metalava) -> stub source files -> (droiddoc/doclava) -> docs 89// 90// The metalava conversion is done by droidstub module "telcom-doc-stubs". 91droiddoc { 92 name: "telecom-cuj-docs", 93 srcs: [ 94 ":telecom-cuj-doc-stubs", 95 ], 96 libs: [ 97 "stub-annotations", 98 "unsupportedappusage", 99 ], 100 custom_template: "droiddoc-templates-sdk", 101 // These variables that are used in doclava templates. 102 hdf: [ 103 "dac true", 104 "sdk.preview 0", // Not a preview version. 105 "sdk.version 31", 106 "android.whichdoc offline", 107 "android.hasSamples false", 108 ], 109 arg_files: [ 110 "AndroidManifest.xml", 111 ], 112 proofread_file: "ds-sdk-docs-proofrerad.txt", 113 // See doclava docs in https://github.com/tinks/doclava. 114 // See error numbers in external/doclava/src/com/google/doclava/Errors.java. 115 // TODO(b/163831343): Add -werror -lerror to catch bad javadocs 116 args: "-android -manifest $(location AndroidManifest.xml) -toroot / -devsite -yamlV2 " + 117 "-hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " + 118 "-stubpackages android.telecom -dac_libraryroot android/telecom ", 119} 120