markchien | 38c3248 | 2021-09-29 12:19:44 +0800 | [diff] [blame] | 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 | |
Bob Badour | 957b694 | 2021-10-07 11:58:21 -0700 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 17 | } |
| 18 | |
markchien | 38c3248 | 2021-09-29 12:19:44 +0800 | [diff] [blame] | 19 | java_library { |
| 20 | name: "netd_aidl_interface-lateststable-java", |
| 21 | sdk_version: "system_current", |
| 22 | min_sdk_version: "29", |
| 23 | static_libs: [ |
Chiachang Wang | 3faa0a0 | 2022-01-11 21:36:45 +0800 | [diff] [blame^] | 24 | "netd_aidl_interface-V8-java", |
markchien | 38c3248 | 2021-09-29 12:19:44 +0800 | [diff] [blame] | 25 | ], |
| 26 | apex_available: [ |
| 27 | "//apex_available:platform", // used from services.net |
markchien | 38c3248 | 2021-09-29 12:19:44 +0800 | [diff] [blame] | 28 | "com.android.tethering", |
| 29 | "com.android.wifi", |
| 30 | ], |
| 31 | } |
| 32 | |
| 33 | cc_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 | |
| 44 | cc_library_static { |
| 45 | name: "netd_aidl_interface-lateststable-ndk", |
| 46 | whole_static_libs: [ |
Chiachang Wang | 3faa0a0 | 2022-01-11 21:36:45 +0800 | [diff] [blame^] | 47 | "netd_aidl_interface-V8-ndk", |
markchien | 38c3248 | 2021-09-29 12:19:44 +0800 | [diff] [blame] | 48 | ], |
| 49 | apex_available: [ |
| 50 | "com.android.resolv", |
| 51 | ], |
| 52 | min_sdk_version: "29", |
| 53 | } |
| 54 | |
| 55 | cc_library_static { |
| 56 | name: "netd_aidl_interface-lateststable-cpp", |
| 57 | whole_static_libs: [ |
Chiachang Wang | 3faa0a0 | 2022-01-11 21:36:45 +0800 | [diff] [blame^] | 58 | "netd_aidl_interface-V8-cpp", |
markchien | 38c3248 | 2021-09-29 12:19:44 +0800 | [diff] [blame] | 59 | ], |
| 60 | } |
| 61 | |
| 62 | aidl_interface { |
| 63 | name: "netd_aidl_interface", |
| 64 | local_include_dir: "binder", |
| 65 | srcs: [ |
| 66 | "binder/android/net/INetd.aidl", |
| 67 | // AIDL interface that callers can implement to receive networking events from netd. |
| 68 | "binder/android/net/INetdUnsolicitedEventListener.aidl", |
| 69 | "binder/android/net/InterfaceConfigurationParcel.aidl", |
| 70 | "binder/android/net/MarkMaskParcel.aidl", |
| 71 | "binder/android/net/NativeNetworkConfig.aidl", |
| 72 | "binder/android/net/NativeNetworkType.aidl", |
| 73 | "binder/android/net/NativeVpnType.aidl", |
| 74 | "binder/android/net/RouteInfoParcel.aidl", |
| 75 | "binder/android/net/TetherConfigParcel.aidl", |
| 76 | "binder/android/net/TetherOffloadRuleParcel.aidl", |
| 77 | "binder/android/net/TetherStatsParcel.aidl", |
| 78 | "binder/android/net/UidRangeParcel.aidl", |
| 79 | // Add new AIDL classes in android.net.netd.aidl to consist with other network modules. |
| 80 | "binder/android/net/netd/aidl/**/*.aidl", |
| 81 | ], |
| 82 | backend: { |
| 83 | cpp: { |
| 84 | gen_log: true, |
| 85 | }, |
| 86 | java: { |
| 87 | // TODO: Remove apex_available and restrict visibility to only mainline modules that are |
| 88 | // either outside the system server or use jarjar to rename the generated AIDL classes. |
| 89 | apex_available: [ |
| 90 | "//apex_available:platform", // used from services.net |
markchien | 38c3248 | 2021-09-29 12:19:44 +0800 | [diff] [blame] | 91 | "com.android.tethering", |
| 92 | "com.android.wifi", |
| 93 | ], |
| 94 | // this is part of updatable modules(NetworkStack) which targets 29(Q) |
| 95 | min_sdk_version: "29", |
| 96 | }, |
| 97 | ndk: { |
| 98 | apex_available: [ |
| 99 | "//apex_available:platform", |
| 100 | ], |
| 101 | // This is necessary for the DnsResovler tests to run in Android Q. |
| 102 | // Soong would recognize this value and produce the Q compatible aidl library. |
| 103 | min_sdk_version: "29", |
| 104 | }, |
| 105 | }, |
| 106 | versions: [ |
| 107 | "1", |
| 108 | "2", |
| 109 | "3", |
| 110 | "4", |
| 111 | "5", |
| 112 | "6", |
| 113 | "7", |
Chiachang Wang | 3faa0a0 | 2022-01-11 21:36:45 +0800 | [diff] [blame^] | 114 | "8", |
markchien | 38c3248 | 2021-09-29 12:19:44 +0800 | [diff] [blame] | 115 | ], |
| 116 | } |
| 117 | |
| 118 | java_library { |
| 119 | name: "netd_event_listener_interface-lateststable-java", |
| 120 | sdk_version: "system_current", |
| 121 | min_sdk_version: "29", |
| 122 | static_libs: [ |
| 123 | "netd_event_listener_interface-V1-java", |
| 124 | ], |
| 125 | apex_available: [ |
| 126 | "//apex_available:platform", |
markchien | 38c3248 | 2021-09-29 12:19:44 +0800 | [diff] [blame] | 127 | "com.android.wifi", |
| 128 | "com.android.tethering", |
| 129 | ], |
| 130 | } |
| 131 | |
| 132 | aidl_interface { |
| 133 | name: "netd_event_listener_interface", |
| 134 | local_include_dir: "binder", |
| 135 | srcs: [ |
| 136 | "binder/android/net/metrics/INetdEventListener.aidl", |
| 137 | ], |
| 138 | versions: ["1"], |
| 139 | backend: { |
| 140 | ndk: { |
| 141 | apex_available: [ |
| 142 | "//apex_available:platform", |
| 143 | "com.android.resolv", |
| 144 | ], |
| 145 | min_sdk_version: "29", |
| 146 | }, |
| 147 | java: { |
| 148 | apex_available: [ |
| 149 | "//apex_available:platform", |
markchien | 38c3248 | 2021-09-29 12:19:44 +0800 | [diff] [blame] | 150 | "com.android.wifi", |
| 151 | "com.android.tethering", |
| 152 | ], |
| 153 | min_sdk_version: "29", |
| 154 | }, |
| 155 | }, |
| 156 | } |