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.android.adservices.jarjar.server", // For packages in jarjar-rules. 44 "com.google.errorprone.annotations", 45 ], 46 libs: [ 47 "framework-configinfrastructure.stubs.module_lib", 48 "framework-adservices.impl", 49 // Workaround for b/262282035. Needed to access the SdkSandboxManagerLocal. 50 "service-sdksandbox.impl", 51 ], 52 static_libs: [ 53 "adservices-shared-storage", 54 "adservices-shared-system-common", 55 "modules-utils-backgroundthread", 56 "modules-utils-preconditions", 57 "modules-utils-shell-command-handler", 58 "error_prone_annotations", 59 ], 60 defaults: [ 61 "framework-system-server-module-defaults", 62 "framework-system-server-module-optimize-defaults", 63 ], 64 jarjar_rules: "jarjar-rules.txt", 65 visibility: [ 66 "//packages/modules/AdServices/tests:__subpackages__", 67 ], 68 impl_library_visibility: [ 69 "//packages/modules/AdServices/adservices/tests/unittest:__subpackages__", 70 "//frameworks/base/services/tests/mockingservicestests", 71 "//frameworks/base/services/tests/wmtests", 72 ], 73 apex_available: ["com.android.adservices"], 74 installable: true, 75 lint: { 76 extra_check_modules: ["AdServicesProdLintChecker"], 77 disabled_checks: ["NewAdServicesFile"], // This library is T+ only. It doesn't need BackCompat Lint check. 78 }, 79} 80