Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 1 | // Copyright (C) 2019 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 | |
Aaron Huang | 57a9496 | 2020-01-03 20:35:55 +0800 | [diff] [blame] | 15 | // 1. The "net-utils-framework-common" library is also compiled into the framework and placed on the |
| 16 | // boot classpath. It uses jarjar rules so that anything outside the framework can use this |
| 17 | // library directly. |
| 18 | // 2. The "net-utils-services-common" library is for use by modules and frameworks/base/services. |
| 19 | // It does not need to be jarjared because it is not placed on the bootclasspath. |
Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame^] | 20 | // 3. The "net-utils-telephony-common-srcs" filegroup is for use specifically by telephony, which |
| 21 | // places many of its classes, even non-API service classes, on the boot classpath. Any file that |
| 22 | // is added to this filegroup *must* have a corresponding jarjar rule in the telephony jarjar |
| 23 | // rules file. Otherwise, it will end up on the boot classpath and other modules will not be able |
| 24 | // to provide their own copy. |
Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 25 | |
| 26 | filegroup { |
| 27 | name: "net-utils-framework-common-srcs", |
| 28 | srcs: ["src_frameworkcommon/**/*.java"], |
| 29 | visibility: ["//frameworks/base"], |
| 30 | } |
| 31 | |
| 32 | java_library { |
| 33 | name: "net-utils-framework-common", |
Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame^] | 34 | srcs: [":net-utils-framework-common-srcs"], |
Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 35 | jarjar_rules: "jarjar-rules-shared.txt", |
| 36 | visibility: [ |
| 37 | "//frameworks/base/packages/Tethering", |
| 38 | "//frameworks/opt/net/wifi", |
| 39 | "//frameworks/opt/net/ike", |
| 40 | "//frameworks/opt/telephony", |
| 41 | "//packages/modules/NetworkStack", |
| 42 | "//packages/modules/CaptivePortalLogin", |
| 43 | ] |
| 44 | } |
Aaron Huang | 57a9496 | 2020-01-03 20:35:55 +0800 | [diff] [blame] | 45 | |
| 46 | java_library { |
| 47 | name: "net-utils-services-common", |
| 48 | srcs: ["src_servicescommon/**/*.java"], |
| 49 | visibility: [ |
| 50 | "//frameworks/base/services", |
| 51 | "//frameworks/base/packages/Tethering", |
| 52 | "//frameworks/opt/net/wifi/service", |
| 53 | "//frameworks/opt/net/ike", |
| 54 | "//packages/modules/NetworkStack", |
| 55 | "//packages/modules/CaptivePortalLogin", |
| 56 | ], |
| 57 | } |
Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame^] | 58 | |
| 59 | // Use a filegroup and not a library for telephony sources, as framework-annotations cannot be |
| 60 | // included either (some annotations would be duplicated on the bootclasspath). |
| 61 | filegroup { |
| 62 | name: "net-utils-telephony-common-srcs", |
| 63 | srcs: [ |
| 64 | // Any class here *must* have a corresponding jarjar rule in the telephony build rules. |
| 65 | "src_servicescommon/android/net/NetworkFactory.java", |
| 66 | ], |
| 67 | visibility: [ |
| 68 | "//frameworks/opt/telephony", |
| 69 | ], |
| 70 | } |