1// 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
15package {
16    default_team: "trendy_team_fwk_core_networking",
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20java_library {
21    name: "netd_aidl_interface-lateststable-java",
22    sdk_version: "system_current",
23    min_sdk_version: "30",
24    static_libs: [
25        "netd_aidl_interface-V15-java",
26    ],
27    apex_available: [
28        "//apex_available:platform", // used from services.net
29        "com.android.tethering",
30        "com.android.wifi",
31    ],
32}
33
34cc_library_static {
35    name: "netd_event_listener_interface-lateststable-ndk",
36    whole_static_libs: [
37        "netd_event_listener_interface-V1-ndk",
38    ],
39    apex_available: [
40        "com.android.resolv",
41    ],
42    min_sdk_version: "30",
43}
44
45cc_library_static {
46    name: "netd_aidl_interface-lateststable-ndk",
47    whole_static_libs: [
48        "netd_aidl_interface-V15-ndk",
49    ],
50    apex_available: [
51        "com.android.resolv",
52        "com.android.tethering",
53    ],
54    min_sdk_version: "30",
55}
56
57cc_defaults {
58    name: "netd_aidl_interface_lateststable_cpp_static",
59    static_libs: ["netd_aidl_interface-V15-cpp"],
60}
61
62cc_defaults {
63    name: "netd_aidl_interface_lateststable_cpp_shared",
64    shared_libs: ["netd_aidl_interface-V15-cpp"],
65}
66
67aidl_interface {
68    name: "netd_aidl_interface",
69    local_include_dir: "binder",
70    srcs: [
71        "binder/android/net/INetd.aidl",
72        // AIDL interface that callers can implement to receive networking events from netd.
73        "binder/android/net/INetdUnsolicitedEventListener.aidl",
74        "binder/android/net/InterfaceConfigurationParcel.aidl",
75        "binder/android/net/IpSecMigrateInfoParcel.aidl",
76        "binder/android/net/MarkMaskParcel.aidl",
77        "binder/android/net/NativeNetworkConfig.aidl",
78        "binder/android/net/NativeNetworkType.aidl",
79        "binder/android/net/NativeVpnType.aidl",
80        "binder/android/net/RouteInfoParcel.aidl",
81        "binder/android/net/TetherConfigParcel.aidl",
82        "binder/android/net/TetherOffloadRuleParcel.aidl",
83        "binder/android/net/TetherStatsParcel.aidl",
84        "binder/android/net/UidRangeParcel.aidl",
85        // Add new AIDL classes in android.net.netd.aidl to consist with other network modules.
86        "binder/android/net/netd/aidl/**/*.aidl",
87    ],
88    backend: {
89        cpp: {
90            gen_log: true,
91        },
92        java: {
93            // TODO: Remove apex_available and restrict visibility to only mainline modules that are
94            // either outside the system server or use jarjar to rename the generated AIDL classes.
95            apex_available: [
96                "//apex_available:platform", // used from services.net
97                "com.android.tethering",
98                "com.android.wifi",
99            ],
100            // this is part of updatable modules(NetworkStack) which targets 30(R)
101            min_sdk_version: "30",
102        },
103        ndk: {
104            apex_available: [
105                "//apex_available:platform",
106                "com.android.tethering",
107            ],
108            // This is necessary for the DnsResovler tests to run in Android R.
109            // Soong would recognize this value and produce the R compatible aidl library.
110            min_sdk_version: "30",
111        },
112    },
113    versions_with_info: [
114        {
115            version: "1",
116            imports: [],
117        },
118        {
119            version: "2",
120            imports: [],
121        },
122        {
123            version: "3",
124            imports: [],
125        },
126        {
127            version: "4",
128            imports: [],
129        },
130        {
131            version: "5",
132            imports: [],
133        },
134        {
135            version: "6",
136            imports: [],
137        },
138        {
139            version: "7",
140            imports: [],
141        },
142        {
143            version: "8",
144            imports: [],
145        },
146        {
147            version: "9",
148            imports: [],
149        },
150        {
151            version: "10",
152            imports: [],
153        },
154        {
155            version: "11",
156            imports: [],
157        },
158        {
159            version: "12",
160            imports: [],
161        },
162        {
163            version: "13",
164            imports: [],
165        },
166        {
167            version: "14",
168            imports: [],
169        },
170        {
171            version: "15",
172            imports: [],
173        },
174
175    ],
176    frozen: true,
177
178}
179
180java_library {
181    name: "netd_event_listener_interface-lateststable-java",
182    sdk_version: "system_current",
183    min_sdk_version: "30",
184    static_libs: [
185        "netd_event_listener_interface-V1-java",
186    ],
187    apex_available: [
188        "//apex_available:platform",
189        "com.android.wifi",
190        "com.android.tethering",
191    ],
192}
193
194aidl_interface {
195    name: "netd_event_listener_interface",
196    local_include_dir: "binder",
197    srcs: [
198        "binder/android/net/metrics/INetdEventListener.aidl",
199    ],
200
201    backend: {
202        ndk: {
203            apex_available: [
204                "//apex_available:platform",
205                "com.android.resolv",
206            ],
207            min_sdk_version: "30",
208        },
209        java: {
210            apex_available: [
211                "//apex_available:platform",
212                "com.android.wifi",
213                "com.android.tethering",
214            ],
215            min_sdk_version: "30",
216        },
217    },
218    versions_with_info: [
219        {
220            version: "1",
221            imports: [],
222        },
223        {
224            version: "2",
225            imports: [],
226        },
227
228    ],
229    frozen: true,
230
231}
232
233aidl_interface {
234    name: "mdns_aidl_interface",
235    local_include_dir: "binder",
236    srcs: [
237        "binder/android/net/mdns/aidl/**/*.aidl",
238    ],
239    backend: {
240        java: {
241            sdk_version: "module_current",
242            apex_available: [
243                "//apex_available:platform",
244                "com.android.tethering",
245            ],
246            min_sdk_version: "30",
247        },
248    },
249    versions_with_info: [
250        {
251            version: "1",
252            imports: [],
253        },
254        {
255            version: "2",
256            imports: [],
257        },
258
259    ],
260    frozen: true,
261
262}
263