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