| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 1 | // | 
|  | 2 | // Copyright (C) 2021 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 |  | 
|  | 17 | package { | 
|  | 18 | // See: http://go/android-license-faq | 
|  | 19 | default_applicable_licenses: ["Android-Apache-2.0"], | 
|  | 20 | } | 
|  | 21 |  | 
| Remi NGUYEN VAN | 0395b70 | 2022-03-08 19:49:49 +0900 | [diff] [blame] | 22 | // Include build rules from Sources.bp | 
|  | 23 | build = ["Sources.bp"] | 
|  | 24 |  | 
| Remi NGUYEN VAN | 24b3c37 | 2021-12-16 15:10:40 +0000 | [diff] [blame] | 25 | java_defaults { | 
|  | 26 | name: "enable-framework-connectivity-t-targets", | 
|  | 27 | enabled: true, | 
|  | 28 | } | 
|  | 29 | // The above defaults can be used to disable framework-connectivity t | 
|  | 30 | // targets while minimizing merge conflicts in the build rules. | 
|  | 31 |  | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 32 | // SDK library for connectivity bootclasspath classes that were part of the non-updatable API before | 
|  | 33 | // T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to | 
|  | 34 | // framework-connectivity. | 
| Remi NGUYEN VAN | 2ba9dbe | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 35 | java_defaults { | 
| paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 36 | name: "framework-connectivity-t-defaults", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 37 | sdk_version: "module_current", | 
|  | 38 | min_sdk_version: "Tiramisu", | 
| Remi NGUYEN VAN | 24b3c37 | 2021-12-16 15:10:40 +0000 | [diff] [blame] | 39 | defaults: [ | 
|  | 40 | "framework-module-defaults", | 
| Remi NGUYEN VAN | 24b3c37 | 2021-12-16 15:10:40 +0000 | [diff] [blame] | 41 | ], | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 42 | srcs: [ | 
|  | 43 | ":framework-connectivity-tiramisu-updatable-sources", | 
| Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 44 | ":framework-nearby-java-sources", | 
|  | 45 | ], | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 46 | stub_only_libs: [ | 
|  | 47 | // Use prebuilt framework-connectivity stubs to avoid circular dependencies | 
|  | 48 | "sdk_module-lib_current_framework-connectivity", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 49 | ], | 
|  | 50 | libs: [ | 
|  | 51 | "unsupportedappusage", | 
|  | 52 | "app-compat-annotations", | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 53 | "sdk_module-lib_current_framework-connectivity", | 
|  | 54 | ], | 
|  | 55 | impl_only_libs: [ | 
|  | 56 | // The build system will use framework-bluetooth module_current stubs, because | 
|  | 57 | // of sdk_version: "module_current" above. | 
| Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 58 | "framework-bluetooth", | 
| Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 59 | "framework-wifi", | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 60 | // Compile against the entire implementation of framework-connectivity, | 
|  | 61 | // including hidden methods. This is safe because if framework-connectivity-t is | 
|  | 62 | // on the bootclasspath (i.e., T), then framework-connectivity is also on the | 
|  | 63 | // bootclasspath (because it shipped in S). | 
|  | 64 | // | 
|  | 65 | // This compiles against the pre-jarjar target so that this code can use | 
|  | 66 | // non-jarjard names of widely-used packages such as com.android.net.module.util. | 
|  | 67 | "framework-connectivity-pre-jarjar", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 68 | ], | 
| Junyu Lai | dc0d521 | 2022-01-13 06:43:37 +0000 | [diff] [blame] | 69 | aidl: { | 
|  | 70 | generate_get_transaction_name: true, | 
|  | 71 | include_dirs: [ | 
|  | 72 | // For connectivity-framework classes such as Network.aidl, | 
|  | 73 | // and connectivity-framework-t classes such as | 
|  | 74 | // NetworkStateSnapshot.aidl | 
|  | 75 | "packages/modules/Connectivity/framework/aidl-export", | 
|  | 76 | ], | 
|  | 77 | }, | 
| Remi NGUYEN VAN | 2ba9dbe | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 78 | apex_available: [ | 
|  | 79 | "com.android.tethering", | 
|  | 80 | ], | 
|  | 81 | } | 
|  | 82 |  | 
|  | 83 | java_library { | 
| paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 84 | name: "framework-connectivity-t-pre-jarjar", | 
|  | 85 | defaults: ["framework-connectivity-t-defaults"], | 
| Remi NGUYEN VAN | 2ba9dbe | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 86 | libs: [ | 
|  | 87 | "framework-bluetooth", | 
| Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 88 | "framework-wifi", | 
| Remi NGUYEN VAN | 2ba9dbe | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 89 | "framework-connectivity-pre-jarjar", | 
|  | 90 | ], | 
|  | 91 | visibility: ["//packages/modules/Connectivity:__subpackages__"], | 
|  | 92 | } | 
|  | 93 |  | 
|  | 94 | // SDK library for connectivity bootclasspath classes that were part of the non-updatable API before | 
|  | 95 | // T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to | 
|  | 96 | // framework-connectivity. | 
|  | 97 | java_sdk_library { | 
| paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 98 | name: "framework-connectivity-t", | 
| Remi NGUYEN VAN | 2ba9dbe | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 99 | defaults: [ | 
| paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 100 | "framework-connectivity-t-defaults", | 
| junyulai | 91e3dc2 | 2022-02-09 18:21:56 +0800 | [diff] [blame] | 101 | "enable-framework-connectivity-t-targets", | 
| Remi NGUYEN VAN | 2ba9dbe | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 102 | ], | 
|  | 103 | // Do not add static_libs to this library: put them in framework-connectivity instead. | 
|  | 104 | // The jarjar rules are only so that references to jarjared utils in | 
|  | 105 | // framework-connectivity-pre-jarjar match at runtime. | 
| Colin Cross | ece3171 | 2022-05-18 18:23:18 +0000 | [diff] [blame] | 106 | jarjar_rules: ":connectivity-jarjar-rules", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 107 | permitted_packages: [ | 
| Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 108 | "android.app.usage", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 109 | "android.net", | 
|  | 110 | "android.net.nsd", | 
| Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 111 | "android.nearby", | 
|  | 112 | "com.android.connectivity", | 
|  | 113 | "com.android.nearby", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 114 | ], | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 115 | impl_library_visibility: [ | 
|  | 116 | "//packages/modules/Connectivity/Tethering/apex", | 
|  | 117 | // In preparation for future move | 
|  | 118 | "//packages/modules/Connectivity/apex", | 
|  | 119 | "//packages/modules/Connectivity/service-t", | 
| Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 120 | "//packages/modules/Nearby/service", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 121 | "//frameworks/base", | 
|  | 122 |  | 
|  | 123 | // Tests using hidden APIs | 
|  | 124 | "//cts/tests/netlegacy22.api", | 
| Lorenzo Colitti | eb8d855 | 2022-02-01 13:51:42 +0900 | [diff] [blame] | 125 | "//cts/tests/tests/app.usage", // NetworkUsageStatsTest | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 126 | "//external/sl4a:__subpackages__", | 
| Remi NGUYEN VAN | 85a4e07 | 2022-02-02 20:06:56 +0900 | [diff] [blame] | 127 | "//frameworks/base/core/tests/bandwidthtests", | 
|  | 128 | "//frameworks/base/core/tests/benchmarks", | 
|  | 129 | "//frameworks/base/core/tests/utillib", | 
| Aaron Huang | 720ad7c | 2022-01-26 00:43:10 +0800 | [diff] [blame] | 130 | "//frameworks/base/tests/vcn", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 131 | "//frameworks/libs/net/common/testutils", | 
|  | 132 | "//frameworks/libs/net/common/tests:__subpackages__", | 
| Xiao Ma | 0a171c0 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 133 | "//frameworks/opt/net/ethernet/tests:__subpackages__", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 134 | "//frameworks/opt/telephony/tests/telephonytests", | 
|  | 135 | "//packages/modules/CaptivePortalLogin/tests", | 
|  | 136 | "//packages/modules/Connectivity/Tethering/tests:__subpackages__", | 
|  | 137 | "//packages/modules/Connectivity/tests:__subpackages__", | 
| Aaron Huang | b5af0fe | 2022-02-11 13:52:29 +0800 | [diff] [blame] | 138 | "//packages/modules/IPsec/tests/iketests", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 139 | "//packages/modules/NetworkStack/tests:__subpackages__", | 
| Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 140 | "//packages/modules/Nearby/tests:__subpackages__", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 141 | "//packages/modules/Wifi/service/tests/wifitests", | 
|  | 142 | ], | 
|  | 143 | } |