1// 2// Copyright (C) 2021 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20filegroup { 21 name: "framework-annotations", 22 srcs: [ 23 ":framework-metalava-annotations", 24 "com/android/internal/annotations/*.java", 25 ], 26 27 // TODO: Prune this list 28 visibility: [ 29 "//frameworks/base", 30 "//frameworks/base/services/net", 31 "//frameworks/base/tools/processors/intdef_mappings", 32 "//frameworks/libs/net/common", 33 "//packages/apps/CellBroadcastReceiver", 34 "//packages/apps/CellBroadcastReceiver/legacy", 35 "//packages/modules/CellBroadcastService", 36 "//packages/modules/NetworkStack/common/netlinkclient", 37 "//packages/modules/NetworkStack/common/networkstackclient", 38 "//packages/services/Iwlan", 39 ], 40} 41 42filegroup { 43 name: "framework-metalava-annotations", 44 srcs: ["android/annotation/*.java"], 45 visibility: [ 46 // This group of files is needed by any metalava invocation that enabled enhancement of 47 // documentation (via javadoc tags like @paramDoc and @returnDoc). They are public for 48 // this purpose. However, java compilation should generally depend (dynamically) on 49 // framework-annotations-lib instead. 50 "//visibility:public", 51 ], 52} 53 54java_library { 55 name: "framework-annotations-lib", 56 srcs: [":framework-annotations"], 57 sdk_version: "core_current", 58 host_supported: true, 59 visibility: [ 60 "//visibility:public", 61 ], 62} 63 64java_library { 65 name: "aconfig-annotations-lib", 66 srcs: [ 67 "com/android/aconfig/annotations/*.java", 68 ], 69 sdk_version: "core_current", 70 host_supported: true, 71 optimize: { 72 proguard_flags_files: ["aconfig_proguard.flags"], 73 export_proguard_flags_files: true, 74 }, 75 visibility: [ 76 "//visibility:public", 77 ], 78} 79 80// Identical to aconfig-annotations-lib, but sdk_version is none. 81// Used for core modules where setting sdk_version of the dependencies as 82// core_current leads to circular dependencies 83java_library { 84 name: "aconfig-annotations-lib-sdk-none", 85 srcs: [ 86 "com/android/aconfig/annotations/*.java", 87 ], 88 sdk_version: "none", 89 system_modules: "core-all-system-modules", 90 host_supported: true, 91 visibility: [ 92 "//visibility:public", 93 ], 94 patch_module: "java.base", 95} 96 97filegroup { 98 name: "framework-api-annotations", 99 srcs: [ 100 "android/annotation/Discouraged.java", 101 "android/annotation/FlaggedApi.java", 102 "android/annotation/IntDef.java", 103 "android/annotation/SystemApi.java", 104 "android/annotation/TestApi.java", 105 "android/annotation/UserIdInt.java", 106 // aconfig annotations 107 "com/android/aconfig/annotations/*.java", 108 ], 109 110 visibility: [ 111 "//art", 112 "//libcore", 113 ], 114} 115 116// TODO(b/183183152) This build rule should really be alongside the source in 117// com/android/modules/utils/ but cannot be due to b/183183152 118filegroup { 119 name: "module-utils-os-aidls", 120 srcs: [ 121 "com/android/modules/utils/ParceledListSlice.aidl", 122 "com/android/modules/utils/StringParceledListSlice.aidl", 123 ], 124 visibility: [ 125 "//frameworks/base/wifi", 126 "//packages/modules/Wifi/framework", 127 "//frameworks/libs/modules-utils/java/com/android/modules/utils", 128 ], 129} 130 131filegroup { 132 name: "modules-utils-synchronous-result-receiver-aidl", 133 srcs: [ 134 "com/android/modules/utils/ISynchronousResultReceiver.aidl", 135 "com/android/modules/utils/SynchronousResultReceiver.aidl", 136 ], 137 visibility: [ 138 "//frameworks/libs/modules-utils/java/com/android/modules/utils", 139 "//packages/modules/Bluetooth/system/binder", 140 "//packages/modules/Bluetooth/android/app/aidl", 141 ], 142} 143 144// This file group is deprecated; new users should use modules-utils-preconditions 145filegroup { 146 name: "modules-utils-preconditions-srcs", 147 srcs: [ 148 "com/android/internal/util/Preconditions.java", 149 ], 150 visibility: [ 151 // TODO: Prune this list 152 "//frameworks/base", 153 "//frameworks/base/core/java", 154 ], 155} 156