blob: a648941a36ecec8ca6662a8678fac3426a553ac1 [file] [log] [blame]
markchien38c32482021-09-29 12:19:44 +08001// Copyright (C) 2021 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
Bob Badour957b6942021-10-07 11:58:21 -070015package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
markchien38c32482021-09-29 12:19:44 +080019java_library {
20 name: "netd_aidl_interface-lateststable-java",
21 sdk_version: "system_current",
22 min_sdk_version: "29",
23 static_libs: [
Lorenzo Colitti747ba672022-06-15 23:39:12 +090024 "netd_aidl_interface-V10-java",
markchien38c32482021-09-29 12:19:44 +080025 ],
26 apex_available: [
27 "//apex_available:platform", // used from services.net
markchien38c32482021-09-29 12:19:44 +080028 "com.android.tethering",
29 "com.android.wifi",
30 ],
31}
32
33cc_library_static {
34 name: "netd_event_listener_interface-lateststable-ndk",
35 whole_static_libs: [
36 "netd_event_listener_interface-V1-ndk",
37 ],
38 apex_available: [
39 "com.android.resolv",
40 ],
41 min_sdk_version: "29",
42}
43
44cc_library_static {
45 name: "netd_aidl_interface-lateststable-ndk",
46 whole_static_libs: [
Lorenzo Colitti747ba672022-06-15 23:39:12 +090047 "netd_aidl_interface-V10-ndk",
markchien38c32482021-09-29 12:19:44 +080048 ],
49 apex_available: [
50 "com.android.resolv",
Wayne Ma67a69e72022-01-12 11:44:27 +080051 "com.android.tethering",
markchien38c32482021-09-29 12:19:44 +080052 ],
53 min_sdk_version: "29",
54}
55
Simon Bowden96f02542022-05-03 11:53:44 +000056// TODO: delete this one when AOSP is no longer auto-merge to git_sc-mainline-prod.
57cc_library_static {
58 name: "netd_aidl_interface-lateststable-cpp",
59 whole_static_libs: [
Lorenzo Colitti747ba672022-06-15 23:39:12 +090060 "netd_aidl_interface-V10-cpp",
Simon Bowden96f02542022-05-03 11:53:44 +000061 ],
62}
63
Ken Chenae296b22022-04-20 15:13:31 +080064cc_defaults {
65 name: "netd_aidl_interface_lateststable_cpp_static",
Lorenzo Colitti747ba672022-06-15 23:39:12 +090066 static_libs: ["netd_aidl_interface-V10-cpp"],
Ken Chenae296b22022-04-20 15:13:31 +080067}
68
69cc_defaults {
70 name: "netd_aidl_interface_lateststable_cpp_shared",
Lorenzo Colitti747ba672022-06-15 23:39:12 +090071 shared_libs: ["netd_aidl_interface-V10-cpp"],
Ken Chenae296b22022-04-20 15:13:31 +080072}
73
markchien38c32482021-09-29 12:19:44 +080074aidl_interface {
75 name: "netd_aidl_interface",
76 local_include_dir: "binder",
77 srcs: [
78 "binder/android/net/INetd.aidl",
79 // AIDL interface that callers can implement to receive networking events from netd.
80 "binder/android/net/INetdUnsolicitedEventListener.aidl",
81 "binder/android/net/InterfaceConfigurationParcel.aidl",
82 "binder/android/net/MarkMaskParcel.aidl",
83 "binder/android/net/NativeNetworkConfig.aidl",
84 "binder/android/net/NativeNetworkType.aidl",
85 "binder/android/net/NativeVpnType.aidl",
86 "binder/android/net/RouteInfoParcel.aidl",
87 "binder/android/net/TetherConfigParcel.aidl",
88 "binder/android/net/TetherOffloadRuleParcel.aidl",
89 "binder/android/net/TetherStatsParcel.aidl",
90 "binder/android/net/UidRangeParcel.aidl",
91 // Add new AIDL classes in android.net.netd.aidl to consist with other network modules.
92 "binder/android/net/netd/aidl/**/*.aidl",
93 ],
94 backend: {
95 cpp: {
96 gen_log: true,
97 },
98 java: {
99 // TODO: Remove apex_available and restrict visibility to only mainline modules that are
100 // either outside the system server or use jarjar to rename the generated AIDL classes.
101 apex_available: [
102 "//apex_available:platform", // used from services.net
markchien38c32482021-09-29 12:19:44 +0800103 "com.android.tethering",
104 "com.android.wifi",
105 ],
106 // this is part of updatable modules(NetworkStack) which targets 29(Q)
107 min_sdk_version: "29",
108 },
109 ndk: {
110 apex_available: [
111 "//apex_available:platform",
Wayne Ma67a69e72022-01-12 11:44:27 +0800112 "com.android.tethering",
markchien38c32482021-09-29 12:19:44 +0800113 ],
114 // This is necessary for the DnsResovler tests to run in Android Q.
115 // Soong would recognize this value and produce the Q compatible aidl library.
116 min_sdk_version: "29",
117 },
118 },
Hungming Chened129262022-04-26 19:10:45 +0800119 versions_with_info: [
120 {
121 version: "1",
122 imports: [],
123 },
124 {
125 version: "2",
126 imports: [],
127 },
128 {
129 version: "3",
130 imports: [],
131 },
132 {
133 version: "4",
134 imports: [],
135 },
136 {
137 version: "5",
138 imports: [],
139 },
140 {
141 version: "6",
142 imports: [],
143 },
144 {
145 version: "7",
146 imports: [],
147 },
148 {
149 version: "8",
150 imports: [],
151 },
152 {
153 version: "9",
154 imports: [],
155 },
Lorenzo Colitti747ba672022-06-15 23:39:12 +0900156 {
157 version: "10",
158 imports: [],
159 },
Hungming Chened129262022-04-26 19:10:45 +0800160
markchien38c32482021-09-29 12:19:44 +0800161 ],
Hungming Chened129262022-04-26 19:10:45 +0800162
markchien38c32482021-09-29 12:19:44 +0800163}
164
165java_library {
166 name: "netd_event_listener_interface-lateststable-java",
167 sdk_version: "system_current",
168 min_sdk_version: "29",
169 static_libs: [
170 "netd_event_listener_interface-V1-java",
171 ],
172 apex_available: [
173 "//apex_available:platform",
markchien38c32482021-09-29 12:19:44 +0800174 "com.android.wifi",
175 "com.android.tethering",
176 ],
177}
178
179aidl_interface {
180 name: "netd_event_listener_interface",
181 local_include_dir: "binder",
182 srcs: [
183 "binder/android/net/metrics/INetdEventListener.aidl",
184 ],
185 versions: ["1"],
186 backend: {
187 ndk: {
188 apex_available: [
189 "//apex_available:platform",
190 "com.android.resolv",
191 ],
192 min_sdk_version: "29",
193 },
194 java: {
195 apex_available: [
196 "//apex_available:platform",
markchien38c32482021-09-29 12:19:44 +0800197 "com.android.wifi",
198 "com.android.tethering",
199 ],
200 min_sdk_version: "29",
201 },
202 },
203}
paulhu483b3562022-01-14 15:30:06 +0800204
paulhu973f6f82022-03-31 02:23:34 +0000205java_library {
206 name: "mdns_aidl_interface-lateststable-java",
207 sdk_version: "module_current",
208 min_sdk_version: "30",
209 static_libs: [
210 "mdns_aidl_interface-V1-java",
211 ],
212 apex_available: [
213 "//apex_available:platform",
214 "com.android.tethering",
215 ],
216}
217
paulhu483b3562022-01-14 15:30:06 +0800218aidl_interface {
219 name: "mdns_aidl_interface",
220 local_include_dir: "binder",
221 srcs: [
222 "binder/android/net/mdns/aidl/**/*.aidl",
223 ],
224 backend: {
225 java: {
226 sdk_version: "module_current",
227 apex_available: [
228 "//apex_available:platform",
229 "com.android.tethering",
230 ],
231 min_sdk_version: "30",
232 },
233 },
paulhu973f6f82022-03-31 02:23:34 +0000234 versions: ["1"],
paulhu483b3562022-01-14 15:30:06 +0800235}