// Copyright (C) 2023 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_applicable_licenses: ["Android-Apache-2.0"], } android_test { name: "AdServicesSharedLibrariesUnitTests", defaults: [ "AdServicesSharedLibrariesUnitTests-defaults", "adservices-shared-extended-mockito-defaults", ], test_suites: [ "general-tests", "mts-adservices", ], } android_ravenwood_test { name: "AdServicesSharedLibrariesUnitTestsRavenwood", srcs: [ // Needed because it's not exposed as library, but in // adservices-shared-extended-mockito-defaults ":adservices-shared-extended-mockito-rule-sources", ], defaults: ["AdServicesSharedLibrariesUnitTests-defaults"], static_libs: [ // Needed by ExtendedMockitoRule references like SpyStatic / MockStatic // (not on AdServicesSharedLibrariesUnitTests-defaults because // AdServicesSharedLibrariesUnitTests gets it from adservices-shared-extended-mockito-defaults "modules-utils-testable-device-config", ], ravenizer: { strip_mockito: true, }, package_name: "com.android.adservices.shared.tests", inst_package_name: "com.android.adservices.shared.tests", auto_gen_config: true, // TODO(b/335935200): add test_suites once stable } // Common stuff used by both the regular and Ravenwood targets java_defaults { name: "AdServicesSharedLibrariesUnitTests-defaults", srcs: [ "java/**/*.java", ":adservices-shared-device-side-meta-testing-sources", ":adservices-shared-sideless-meta-testing-sources", ":adservices-shared-sideless-tests-sources", ], static_libs: [ "adservices-shared-common", "adservices-datastore_testing", "adservices-shared-error-logging", "adservices-shared-exceptions", "adservices-shared-metriclogger", "adservices-shared-mockito-expectations", "adservices-shared-proto-lite", "adservices-shared-proto-utils", "adservices-shared-spe", "adservices-shared-storage", "adservices-shared-system-common", "adservices-shared-testing", "adservices-shared-util", "androidx.test.core", "androidx.test.runner", "auto_value_annotations", "compatibility-device-util-axt", "truth", ], libs: [ "framework-connectivity.stubs.module_lib", ], plugins: ["auto_annotation_plugin"], min_sdk_version: "30", }