blob: 73314532a52f2b101c100795d1ac3e944909aa0f [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
21 // A large-scale-change added 'default_applicable_licenses' to import
22 // all of the 'license_kinds' from "frameworks_base_license"
23 // to get the below license kinds:
24 // SPDX-license-identifier-Apache-2.0
25 default_applicable_licenses: ["frameworks_base_license"],
26}
27
28java_library {
29 name: "FrameworksNetCommonTests",
30 defaults: ["framework-connectivity-test-defaults"],
31 srcs: [
32 "java/**/*.java",
33 "java/**/*.kt",
34 ],
35 static_libs: [
36 "androidx.core_core",
37 "androidx.test.rules",
38 "junit",
39 "mockito-target-minus-junit4",
40 "modules-utils-build",
41 "net-tests-utils",
42 "net-utils-framework-common",
43 "platform-test-annotations",
44 ],
45 libs: [
46 "android.test.base.stubs",
47 ],
48}
Remi NGUYEN VANdc56aa22021-05-14 07:24:53 +000049
50// defaults for tests that need to build against framework-connectivity's @hide APIs
51// Only usable from targets that have visibility on framework-connectivity.impl.
52// Instead of using this, consider avoiding to depend on hidden connectivity APIs in
53// tests.
54java_defaults {
55 name: "framework-connectivity-test-defaults",
56 sdk_version: "core_platform", // tests can use @CorePlatformApi's
57 libs: [
58 // order matters: classes in framework-connectivity are resolved before framework,
59 // meaning @hide APIs in framework-connectivity are resolved before @SystemApi
60 // stubs in framework
61 "framework-connectivity.impl",
62 "framework",
63
64 // if sdk_version="" this gets automatically included, but here we need to add manually.
65 "framework-res",
66 ],
67}