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