blob: 3f867fcd7ca04a3eddd68b3eb30b9562f6aa2995 [file] [log] [blame]
Aaron Huangf73ff8c2019-12-06 18:12:24 +08001// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Aaron Huang57a94962020-01-03 20:35:55 +080015// 1. The "net-utils-framework-common" library is also compiled into the framework and placed on the
16// boot classpath. It uses jarjar rules so that anything outside the framework can use this
17// library directly.
18// 2. The "net-utils-services-common" library is for use by modules and frameworks/base/services.
19// It does not need to be jarjared because it is not placed on the bootclasspath.
Lorenzo Colittie14bd342020-01-14 14:47:16 +090020// 3. The "net-utils-telephony-common-srcs" filegroup is for use specifically by telephony, which
21// places many of its classes, even non-API service classes, on the boot classpath. Any file that
22// is added to this filegroup *must* have a corresponding jarjar rule in the telephony jarjar
23// rules file. Otherwise, it will end up on the boot classpath and other modules will not be able
24// to provide their own copy.
Aaron Huangf73ff8c2019-12-06 18:12:24 +080025
26filegroup {
27 name: "net-utils-framework-common-srcs",
28 srcs: ["src_frameworkcommon/**/*.java"],
29 visibility: ["//frameworks/base"],
30}
31
32java_library {
33 name: "net-utils-framework-common",
Lorenzo Colittie14bd342020-01-14 14:47:16 +090034 srcs: [":net-utils-framework-common-srcs"],
Aaron Huangf73ff8c2019-12-06 18:12:24 +080035 jarjar_rules: "jarjar-rules-shared.txt",
36 visibility: [
37 "//frameworks/base/packages/Tethering",
38 "//frameworks/opt/net/wifi",
39 "//frameworks/opt/net/ike",
40 "//frameworks/opt/telephony",
41 "//packages/modules/NetworkStack",
42 "//packages/modules/CaptivePortalLogin",
Lorenzo Colitti5d9f8ed2020-01-21 15:31:06 +090043 "//frameworks/libs/net/common/tests:__subpackages__",
Aaron Huangf73ff8c2019-12-06 18:12:24 +080044 ]
45}
Aaron Huang57a94962020-01-03 20:35:55 +080046
47java_library {
48 name: "net-utils-services-common",
49 srcs: ["src_servicescommon/**/*.java"],
50 visibility: [
51 "//frameworks/base/services",
52 "//frameworks/base/packages/Tethering",
53 "//frameworks/opt/net/wifi/service",
54 "//frameworks/opt/net/ike",
55 "//packages/modules/NetworkStack",
56 "//packages/modules/CaptivePortalLogin",
Lorenzo Colitti5d9f8ed2020-01-21 15:31:06 +090057 "//frameworks/libs/net/common/tests:__subpackages__",
Aaron Huang57a94962020-01-03 20:35:55 +080058 ],
59}
Lorenzo Colittie14bd342020-01-14 14:47:16 +090060
61// Use a filegroup and not a library for telephony sources, as framework-annotations cannot be
62// included either (some annotations would be duplicated on the bootclasspath).
63filegroup {
64 name: "net-utils-telephony-common-srcs",
65 srcs: [
66 // Any class here *must* have a corresponding jarjar rule in the telephony build rules.
67 "src_servicescommon/android/net/NetworkFactory.java",
68 ],
69 visibility: [
70 "//frameworks/opt/telephony",
71 ],
72}