// Copyright (C) 2022 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_team: "trendy_team_rubidium_sdk_runtime",
    default_applicable_licenses: ["Android-Apache-2.0"],
}

android_test {
    name: "SdkSandboxManagerTests",
    srcs: [
        "src/**/*endtoend/*.java",
    ],
    static_libs: [
        "androidx.test.ext.junit",
        "androidx.test.runner",
        "compatibility-device-util-axt-minus-dexmaker",
        "truth",
        "modules-utils-build",
        "SdkSandboxTestUtils",
        "CtsSdkProviderApi",
        "CtsMediationTestSdkApi",
        "sdk_sandbox_flags_lib",
        "android.content.pm.flags-aconfig-java",
        "flag-junit",
    ],
    libs: [
        "android.test.base.stubs.system",
        "android.test.mock.stubs.system",
        "android.test.runner.stubs.system",
        "framework-configinfrastructure.stubs.module_lib",
    ],
    data: [
        ":EmptySdkProviderApp",
        ":SdkSandboxManagerCtsProvider",
        ":SdkSandboxMediationTestProvider",
        ":CtsSdkProviderAppWithoutSdkProviderClassNameProperty",
    ],
    min_sdk_version: "Tiramisu",
    target_sdk_version: "Tiramisu",
    test_suites: [
        "cts",
        "mts-adservices",
        "general-tests",
        "mcts-adservices",
    ],
    jarjar_rules: ":test-service-jarjar-rules",
}

android_test {
    name: "SdkSandboxManagerDisabledTests",
    srcs: [
        "src/**/*disablede2e/*.java",
    ],
    static_libs: [
        "androidx.test.ext.junit",
        "androidx.test.runner",
        "truth",
        "SdkSandboxTestUtils",
    ],
    libs: [
        "android.test.base.stubs.system",
        "android.test.mock.stubs.system",
        "android.test.runner.stubs.system",
    ],
    data: [
        ":SdkSandboxManagerCtsProvider",
    ],
    test_config: "DisabledAndroidTest.xml",
    manifest: "DisabledAndroidManifest.xml",
    min_sdk_version: "Tiramisu",
    target_sdk_version: "current",
    test_suites: [
        "cts",
        "mts-adservices",
        "general-tests",
        "mcts-adservices",
    ],
    jarjar_rules: ":test-service-jarjar-rules",
}
