blob: 1f0303c063f42b6a8bb79a623ee20f6595a59f30 [file] [log] [blame]
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +09001//
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
Bob Badour6c7ed9d2021-02-12 17:07:05 -080017package {
18 // See: http://go/android-license-faq
Baligh Uddin36847132021-05-23 16:38:40 +000019 default_applicable_licenses: ["Android-Apache-2.0"],
Bob Badour6c7ed9d2021-02-12 17:07:05 -080020}
21
Remi NGUYEN VANf96b2662021-03-14 15:28:10 +090022java_library {
23 name: "framework-connectivity-protos",
Remi NGUYEN VANe4d51c92021-03-19 00:24:45 +000024 sdk_version: "module_current",
Remi NGUYEN VANf96b2662021-03-14 15:28:10 +090025 proto: {
26 type: "nano",
27 },
28 srcs: [
29 // TODO: consider moving relevant .proto files directly to the module directory
30 ":framework-javastream-protos",
31 ],
32 apex_available: [
33 "//apex_available:platform",
34 "com.android.tethering",
35 ],
36 jarjar_rules: "jarjar-rules-proto.txt",
37 visibility: [
38 "//visibility:private",
39 ],
40}
41
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090042filegroup {
Remi NGUYEN VAN6916d512021-02-15 20:16:28 +090043 name: "framework-connectivity-internal-sources",
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090044 srcs: [
45 "src/**/*.java",
46 "src/**/*.aidl",
47 ],
48 path: "src",
49 visibility: [
Remi NGUYEN VAN6916d512021-02-15 20:16:28 +090050 "//visibility:private",
51 ],
52}
53
54filegroup {
55 name: "framework-connectivity-aidl-export-sources",
56 srcs: [
57 "aidl-export/**/*.aidl",
58 ],
59 path: "aidl-export",
60 visibility: [
61 "//visibility:private",
62 ],
63}
64
65// TODO: use a java_library in the bootclasspath instead
66filegroup {
67 name: "framework-connectivity-sources",
68 srcs: [
69 ":framework-connectivity-internal-sources",
70 ":framework-connectivity-aidl-export-sources",
71 ],
72 visibility: [
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090073 "//frameworks/base",
74 "//packages/modules/Connectivity:__subpackages__",
75 ],
Bob Badour6c7ed9d2021-02-12 17:07:05 -080076}
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090077
78java_sdk_library {
79 name: "framework-connectivity",
80 api_only: true,
81 defaults: ["framework-module-defaults"],
Remi NGUYEN VANe4d51c92021-03-19 00:24:45 +000082 installable: true,
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090083 srcs: [
84 ":framework-connectivity-sources",
85 ],
86 aidl: {
87 include_dirs: [
88 // Include directories for parcelables that are part of the stable API, and need a
89 // one-line "parcelable X" .aidl declaration to be used in AIDL interfaces.
90 // TODO(b/180293679): remove these dependencies as they should not be necessary once
91 // the module builds against API (the parcelable declarations exist in framework.aidl)
92 "frameworks/base/core/java", // For framework parcelables
93 "frameworks/native/aidl/binder", // For PersistableBundle.aidl
94 ],
95 },
96 libs: [
97 "unsupportedappusage",
98 ],
Remi NGUYEN VAN1fd558e2021-03-19 10:13:40 +000099 permitted_packages: ["android.net"],
100}
101
102cc_defaults {
103 name: "libframework-connectivity-defaults",
104 cflags: [
105 "-Wall",
106 "-Werror",
107 "-Wno-unused-parameter",
108 "-Wthread-safety",
109 ],
110 shared_libs: [
111 "libbase",
112 "liblog",
113 "libnativehelper",
114 "libnetd_client",
115 ],
116 header_libs: [
117 "dnsproxyd_protocol_headers",
118 ],
119}
120
121cc_library_static {
122 name: "libconnectivityframeworkutils",
123 defaults: ["libframework-connectivity-defaults"],
124 srcs: [
125 "jni/android_net_NetworkUtils.cpp",
126 ],
Remi NGUYEN VANa5e11482021-03-21 14:30:38 +0000127 shared_libs: ["libandroid_net"],
Remi NGUYEN VAN1fd558e2021-03-19 10:13:40 +0000128 apex_available: [
129 "//apex_available:platform",
130 "com.android.tethering",
131 ],
132}
133
134cc_library_shared {
135 name: "libframework-connectivity-jni",
136 defaults: ["libframework-connectivity-defaults"],
137 srcs: [
138 "jni/onload.cpp",
139 ],
Remi NGUYEN VANa5e11482021-03-21 14:30:38 +0000140 shared_libs: ["libandroid"],
Remi NGUYEN VAN1fd558e2021-03-19 10:13:40 +0000141 static_libs: ["libconnectivityframeworkutils"],
142 apex_available: [
143 "//apex_available:platform",
144 "com.android.tethering",
Remi NGUYEN VANe4d51c92021-03-19 00:24:45 +0000145 ],
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900146}
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900147
148java_library {
149 name: "framework-connectivity.impl",
Remi NGUYEN VANe4d51c92021-03-19 00:24:45 +0000150 sdk_version: "module_current",
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900151 srcs: [
152 ":framework-connectivity-sources",
153 ],
154 aidl: {
155 include_dirs: [
156 "frameworks/base/core/java", // For framework parcelables
157 "frameworks/native/aidl/binder", // For PersistableBundle.aidl
158 ],
159 },
160 libs: [
Remi NGUYEN VANe4d51c92021-03-19 00:24:45 +0000161 // TODO (b/183097033) remove once module_current includes core_current
162 "stable.core.platform.api.stubs",
163 "framework-tethering",
164 "framework-wifi",
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900165 "unsupportedappusage",
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900166 ],
167 static_libs: [
Remi NGUYEN VANf96b2662021-03-14 15:28:10 +0900168 "framework-connectivity-protos",
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900169 "net-utils-device-common",
170 ],
171 jarjar_rules: "jarjar-rules.txt",
172 apex_available: ["com.android.tethering"],
173 installable: true,
Remi NGUYEN VAN1fd558e2021-03-19 10:13:40 +0000174 permitted_packages: ["android.net"],
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900175}