blob: e8963b9011ff3e7c2c12e202a8567e23ba2dc3a4 [file] [log] [blame]
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +00001//
2// Copyright (C) 2019 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
17// Tests in this folder are included both in unit tests and CTS.
18// They must be fast and stable, and exercise public or test APIs.
19package {
20 // See: http://go/android-license-faq
Baligh Uddin2afd0982021-05-24 03:50:01 +000021 default_applicable_licenses: ["Android-Apache-2.0"],
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000022}
23
24java_library {
25 name: "FrameworksNetCommonTests",
26 defaults: ["framework-connectivity-test-defaults"],
27 srcs: [
28 "java/**/*.java",
29 "java/**/*.kt",
30 ],
31 static_libs: [
32 "androidx.core_core",
33 "androidx.test.rules",
34 "junit",
35 "mockito-target-minus-junit4",
36 "modules-utils-build",
37 "net-tests-utils",
38 "net-utils-framework-common",
39 "platform-test-annotations",
40 ],
41 libs: [
42 "android.test.base.stubs",
43 ],
44}
Remi NGUYEN VANdc56aa22021-05-14 07:24:53 +000045
46// defaults for tests that need to build against framework-connectivity's @hide APIs
47// Only usable from targets that have visibility on framework-connectivity.impl.
48// Instead of using this, consider avoiding to depend on hidden connectivity APIs in
49// tests.
50java_defaults {
51 name: "framework-connectivity-test-defaults",
52 sdk_version: "core_platform", // tests can use @CorePlatformApi's
53 libs: [
54 // order matters: classes in framework-connectivity are resolved before framework,
55 // meaning @hide APIs in framework-connectivity are resolved before @SystemApi
56 // stubs in framework
57 "framework-connectivity.impl",
58 "framework",
59
60 // if sdk_version="" this gets automatically included, but here we need to add manually.
61 "framework-res",
62 ],
63}