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_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21android_test {
22    name: "CaptivePortalLoginTests",
23    defaults: ["framework-connectivity-test-defaults"],
24    srcs: ["src/**/*.java", "src/**/*.kt"],
25    platform_apis: true,
26    min_sdk_version: "29",
27    test_suites: ["device-tests"],
28
29    static_libs: [
30        "androidx.test.rules",
31        "androidx.test.uiautomator",
32        "mockito-target-extended-minus-junit4",
33        "CaptivePortalLoginTestLib",
34        "android.test.runner-minus-junit",
35        "androidx.test.core",
36        "androidx.test.espresso.intents",
37        "androidx.test.espresso.web",
38        "androidx.test.ext.junit",
39        "androidx.test.uiautomator",
40        "kotlin-test",
41        "libnanohttpd",
42        "net-tests-utils",
43    ],
44    libs: [
45        "android.test.runner",
46        "android.test.base",
47        "android.test.mock",
48    ],
49    jni_libs: [
50        // For mockito extended
51        "libdexmakerjvmtiagent",
52        "libstaticjvmtiagent",
53    ],
54    // If CaptivePortalLoginActivityTest wants to run on Q device, it needs to set sdk_version for
55    // using the portable JNI libraries.
56    // jni_uses_sdk_apis is a workaround for CaptivePortalLoginActivityTest to run on Q device.
57    // See b/154665579 to get more detail.
58    jni_uses_sdk_apis: true,
59}
60