1//
2// Copyright (C) 2020 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//
16
17package {
18    default_team: "trendy_team_fwk_core_networking",
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22android_test {
23    name: "CaptivePortalLoginTests",
24    defaults: [
25        "framework-connectivity-test-defaults",
26    ],
27    srcs: [
28        "src/**/*.java",
29        "src/**/*.kt",
30    ],
31    platform_apis: true,
32    compile_multilib: "both",
33    min_sdk_version: "30",
34    target_sdk_version: "35", // Keep in sync with CaptivePortalLogin
35    test_suites: [
36        "general-tests",
37        "mts-networking",
38    ],
39    test_config: "AndroidTest.xml",
40
41    static_libs: [
42        "androidx.test.rules",
43        "androidx.test.uiautomator_uiautomator",
44        "mockito-target-minus-junit4",
45        "CaptivePortalLoginTestLib",
46        "android.test.runner-minus-junit",
47        "androidx.test.core",
48        "androidx.test.espresso.intents",
49        "androidx.test.espresso.web",
50        "androidx.test.ext.junit",
51        "collector-device-lib",
52        "kotlin-test",
53        "libnanohttpd",
54        "net-tests-utils",
55    ],
56    libs: [
57        "android.test.runner.stubs",
58        "android.test.base.stubs",
59        "android.test.mock.stubs",
60    ],
61    // If CaptivePortalLoginActivityTest wants to run on Q device, it needs to set sdk_version for
62    // using the portable JNI libraries.
63    // jni_uses_sdk_apis is a workaround for CaptivePortalLoginActivityTest to run on Q device.
64    // See b/154665579 to get more detail.
65    jni_uses_sdk_apis: true,
66}
67