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