1// Copyright (C) 2022 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_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19filegroup { 20 name: "service-adservices-sources", 21 srcs: [ 22 "java/**/*.java", 23 ], 24 visibility: [ 25 "//packages/modules/AdServices/adservices:__subpackages__", 26 ], 27 path: "java", 28} 29 30java_sdk_library { 31 name: "service-adservices", 32 srcs: [ 33 ":service-adservices-sources", 34 ":adservices-shared-flag-annotation-sources", 35 ":adservices-service-common-flags-sources", 36 ], 37 sdk_version: "system_server_current", 38 min_sdk_version: "Tiramisu", 39 permitted_packages: [ 40 "com.android.adservices.shared", 41 "com.android.adservices.service", // TODO(b/306522832): needed by CommonFlags, ideally they should be moved to a separate package 42 "com.android.server.adservices", 43 "com.google.errorprone.annotations", 44 ], 45 libs: [ 46 "framework-configinfrastructure", 47 "framework-adservices.impl", 48 // Workaround for b/262282035. Needed to access the SdkSandboxManagerLocal. 49 "service-sdksandbox.impl", 50 ], 51 static_libs: [ 52 "adservices-shared-storage", 53 "modules-utils-backgroundthread", 54 "modules-utils-preconditions", 55 "modules-utils-shell-command-handler", 56 "error_prone_annotations", 57 ], 58 defaults: [ 59 "framework-system-server-module-defaults", 60 "framework-system-server-module-optimize-defaults", 61 ], 62 jarjar_rules: "jarjar-rules.txt", 63 visibility: [ 64 "//packages/modules/AdServices/tests:__subpackages__", 65 ], 66 impl_library_visibility: [ 67 "//packages/modules/AdServices/adservices/tests/unittest:__subpackages__", 68 "//frameworks/base/services/tests/mockingservicestests", 69 "//frameworks/base/services/tests/wmtests", 70 ], 71 apex_available: ["com.android.adservices"], 72 installable: true, 73 lint: { 74 extra_check_modules: ["AdServicesProdLintChecker"], 75 disabled_checks: ["NewAdServicesFile"], // This library is T+ only. It doesn't need BackCompat Lint check. 76 }, 77} 78