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 { |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 18 | default_team: "trendy_team_fwk_core_networking", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 19 | // See: http://go/android-license-faq |
| 20 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 21 | } |
| 22 | |
Remi NGUYEN VAN | c41daa4 | 2023-08-14 15:34:20 +0900 | [diff] [blame] | 23 | service_remoteauth_pre_jarjar_lib = "service-remoteauth-pre-jarjar" |
| 24 | |
Remi NGUYEN VAN | 0395b70 | 2022-03-08 19:49:49 +0900 | [diff] [blame] | 25 | // Include build rules from Sources.bp |
| 26 | build = ["Sources.bp"] |
| 27 | |
Remi NGUYEN VAN | 86bbfe9 | 2022-03-30 18:51:41 +0900 | [diff] [blame] | 28 | filegroup { |
| 29 | name: "service-connectivity-tiramisu-sources", |
| 30 | srcs: [ |
| 31 | "src/**/*.java", |
| 32 | ], |
| 33 | visibility: ["//visibility:private"], |
| 34 | } |
Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 35 | |
Remi NGUYEN VAN | 86bbfe9 | 2022-03-30 18:51:41 +0900 | [diff] [blame] | 36 | // The above filegroup can be used to specify different sources depending |
| 37 | // on the branch, while minimizing merge conflicts in the rest of the |
| 38 | // build rules. |
| 39 | |
paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 40 | // This builds T+ services depending on framework-connectivity-t |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 41 | // hidden symbols separately from the S+ services, to ensure that S+ |
| 42 | // services cannot accidentally depend on T+ hidden symbols from |
paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 43 | // framework-connectivity-t. |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 44 | java_library { |
| 45 | name: "service-connectivity-tiramisu-pre-jarjar", |
| 46 | sdk_version: "system_server_current", |
| 47 | // TODO(b/210962470): Bump this to at least S, and then T. |
| 48 | min_sdk_version: "30", |
| 49 | srcs: [ |
Remi NGUYEN VAN | 86bbfe9 | 2022-03-30 18:51:41 +0900 | [diff] [blame] | 50 | ":service-connectivity-tiramisu-sources", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 51 | ], |
| 52 | libs: [ |
| 53 | "framework-annotations-lib", |
Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame^] | 54 | "framework-configinfrastructure.stubs.module_lib", |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 55 | "framework-connectivity-pre-jarjar", |
paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 56 | "framework-connectivity-t-pre-jarjar", |
Igor Chernyshev | 9dac660 | 2022-12-13 19:28:32 -0800 | [diff] [blame] | 57 | // TODO: use framework-tethering-pre-jarjar when it is separated from framework-tethering |
| 58 | "framework-tethering.impl", |
Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame^] | 59 | "framework-wifi.stubs.module_lib", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 60 | "service-connectivity-pre-jarjar", |
Remi NGUYEN VAN | b6cde3d | 2022-03-10 04:32:15 +0000 | [diff] [blame] | 61 | "service-nearby-pre-jarjar", |
Sandro Montanari | 9ffc068 | 2024-07-24 15:50:37 +0000 | [diff] [blame] | 62 | "service-networksecurity-pre-jarjar", |
Kangping Dong | e7fef89 | 2023-08-11 15:30:09 +0800 | [diff] [blame] | 63 | "service-thread-pre-jarjar", |
Remi NGUYEN VAN | c41daa4 | 2023-08-14 15:34:20 +0900 | [diff] [blame] | 64 | service_remoteauth_pre_jarjar_lib, |
Xiao Ma | 0a171c0 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 65 | "ServiceConnectivityResources", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 66 | "unsupportedappusage", |
| 67 | ], |
| 68 | static_libs: [ |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 69 | // Do not add static_libs here if they are already included in framework-connectivity |
| 70 | // or in service-connectivity. They are not necessary (included via |
| 71 | // service-connectivity-pre-jarjar), and in the case of code that is already in |
| 72 | // framework-connectivity, the classes would be included in the apex twice. |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 73 | "modules-utils-statemachine", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 74 | ], |
| 75 | apex_available: [ |
| 76 | "com.android.tethering", |
| 77 | ], |
| 78 | visibility: [ |
Chiachang Wang | a5d9875 | 2024-02-28 07:50:15 +0000 | [diff] [blame] | 79 | "//frameworks/base/services/tests/VpnTests", |
Aaron Huang | 720ad7c | 2022-01-26 00:43:10 +0800 | [diff] [blame] | 80 | "//frameworks/base/tests/vcn", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 81 | "//packages/modules/Connectivity/service", |
| 82 | "//packages/modules/Connectivity/tests:__subpackages__", |
Aaron Huang | 720ad7c | 2022-01-26 00:43:10 +0800 | [diff] [blame] | 83 | "//packages/modules/IPsec/tests/iketests", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 84 | ], |
Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 85 | lint: { |
| 86 | baseline_filename: "lint-baseline.xml", |
| 87 | }, |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 88 | } |
Yuyang Huang | 6e12ac6 | 2023-04-04 13:00:54 +0900 | [diff] [blame] | 89 | |
| 90 | // Test building mDNS as a standalone, so that it can be imported into other repositories as-is. |
| 91 | // The mDNS code is platform code so it should use framework-annotations-lib, contrary to apps that |
| 92 | // should use sdk_version: "system_current" and only androidx.annotation_annotation. But this build |
| 93 | // rule verifies that the mDNS code can be built into apps, if code transformations are applied to |
| 94 | // the annotations. |
| 95 | // When using "system_current", framework annotations are not available; they would appear as |
| 96 | // package-private as they are marked as such in the system_current stubs. So build against |
| 97 | // core_platform and add the stubs manually in "libs". See http://b/147773144#comment7. |
| 98 | java_library { |
| 99 | name: "service-connectivity-mdns-standalone-build-test", |
| 100 | sdk_version: "core_platform", |
Yuyang Huang | fc83170 | 2023-08-21 17:48:48 +0900 | [diff] [blame] | 101 | min_sdk_version: "21", |
| 102 | lint: { |
| 103 | error_checks: ["NewApi"], |
Cole Faust | be30b3e | 2024-01-25 02:41:58 +0000 | [diff] [blame] | 104 | |
Yuyang Huang | fc83170 | 2023-08-21 17:48:48 +0900 | [diff] [blame] | 105 | }, |
Yuyang Huang | 6e12ac6 | 2023-04-04 13:00:54 +0900 | [diff] [blame] | 106 | srcs: [ |
Yuyang Huang | 6e12ac6 | 2023-04-04 13:00:54 +0900 | [diff] [blame] | 107 | "src/com/android/server/connectivity/mdns/**/*.java", |
Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 108 | ":service-mdns-droidstubs", |
Yuyang Huang | 6e12ac6 | 2023-04-04 13:00:54 +0900 | [diff] [blame] | 109 | ], |
| 110 | exclude_srcs: [ |
| 111 | "src/com/android/server/connectivity/mdns/internal/SocketNetlinkMonitor.java", |
Kangping Dong | 1a1beee | 2023-09-22 18:32:02 +0800 | [diff] [blame] | 112 | "src/com/android/server/connectivity/mdns/SocketNetLinkMonitorFactory.java", |
| 113 | "src/com/android/server/connectivity/mdns/MdnsAdvertiser.java", |
| 114 | "src/com/android/server/connectivity/mdns/MdnsAnnouncer.java", |
| 115 | "src/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiser.java", |
| 116 | "src/com/android/server/connectivity/mdns/MdnsProber.java", |
| 117 | "src/com/android/server/connectivity/mdns/MdnsRecordRepository.java", |
Yuyang Huang | 6e12ac6 | 2023-04-04 13:00:54 +0900 | [diff] [blame] | 118 | ], |
| 119 | static_libs: [ |
| 120 | "net-utils-device-common-mdns-standalone-build-test", |
| 121 | ], |
| 122 | libs: [ |
| 123 | "framework-annotations-lib", |
| 124 | "android_system_stubs_current", |
| 125 | "androidx.annotation_annotation", |
| 126 | ], |
| 127 | visibility: [ |
| 128 | "//visibility:private", |
| 129 | ], |
| 130 | } |
| 131 | |
| 132 | droidstubs { |
| 133 | name: "service-mdns-droidstubs", |
| 134 | srcs: ["src/com/android/server/connectivity/mdns/SocketNetLinkMonitorFactory.java"], |
| 135 | libs: [ |
| 136 | "net-utils-device-common-mdns-standalone-build-test", |
Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 137 | "service-connectivity-tiramisu-pre-jarjar", |
Yuyang Huang | 6e12ac6 | 2023-04-04 13:00:54 +0900 | [diff] [blame] | 138 | ], |
| 139 | visibility: [ |
| 140 | "//visibility:private", |
| 141 | ], |
Kangping Dong | e7fef89 | 2023-08-11 15:30:09 +0800 | [diff] [blame] | 142 | } |