Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2020 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 | |
Bob Badour | 6c7ed9d | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 17 | package { |
| 18 | // See: http://go/android-license-faq |
| 19 | // A large-scale-change added 'default_applicable_licenses' to import |
| 20 | // all of the 'license_kinds' from "frameworks_base_license" |
| 21 | // to get the below license kinds: |
| 22 | // SPDX-license-identifier-Apache-2.0 |
| 23 | default_applicable_licenses: ["frameworks_base_license"], |
| 24 | } |
| 25 | |
Remi NGUYEN VAN | f96b266 | 2021-03-14 15:28:10 +0900 | [diff] [blame^] | 26 | java_library { |
| 27 | name: "framework-connectivity-protos", |
| 28 | proto: { |
| 29 | type: "nano", |
| 30 | }, |
| 31 | srcs: [ |
| 32 | // TODO: consider moving relevant .proto files directly to the module directory |
| 33 | ":framework-javastream-protos", |
| 34 | ], |
| 35 | apex_available: [ |
| 36 | "//apex_available:platform", |
| 37 | "com.android.tethering", |
| 38 | ], |
| 39 | jarjar_rules: "jarjar-rules-proto.txt", |
| 40 | visibility: [ |
| 41 | "//visibility:private", |
| 42 | ], |
| 43 | } |
| 44 | |
Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 45 | filegroup { |
Remi NGUYEN VAN | 6916d51 | 2021-02-15 20:16:28 +0900 | [diff] [blame] | 46 | name: "framework-connectivity-internal-sources", |
Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 47 | srcs: [ |
| 48 | "src/**/*.java", |
| 49 | "src/**/*.aidl", |
| 50 | ], |
| 51 | path: "src", |
| 52 | visibility: [ |
Remi NGUYEN VAN | 6916d51 | 2021-02-15 20:16:28 +0900 | [diff] [blame] | 53 | "//visibility:private", |
| 54 | ], |
| 55 | } |
| 56 | |
| 57 | filegroup { |
| 58 | name: "framework-connectivity-aidl-export-sources", |
| 59 | srcs: [ |
| 60 | "aidl-export/**/*.aidl", |
| 61 | ], |
| 62 | path: "aidl-export", |
| 63 | visibility: [ |
| 64 | "//visibility:private", |
| 65 | ], |
| 66 | } |
| 67 | |
| 68 | // TODO: use a java_library in the bootclasspath instead |
| 69 | filegroup { |
| 70 | name: "framework-connectivity-sources", |
| 71 | srcs: [ |
| 72 | ":framework-connectivity-internal-sources", |
| 73 | ":framework-connectivity-aidl-export-sources", |
| 74 | ], |
| 75 | visibility: [ |
Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 76 | "//frameworks/base", |
| 77 | "//packages/modules/Connectivity:__subpackages__", |
| 78 | ], |
Bob Badour | 6c7ed9d | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 79 | } |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 80 | |
| 81 | java_sdk_library { |
| 82 | name: "framework-connectivity", |
| 83 | api_only: true, |
| 84 | defaults: ["framework-module-defaults"], |
| 85 | // TODO: build against module API |
| 86 | platform_apis: true, |
| 87 | srcs: [ |
| 88 | ":framework-connectivity-sources", |
| 89 | ], |
| 90 | aidl: { |
| 91 | include_dirs: [ |
| 92 | // Include directories for parcelables that are part of the stable API, and need a |
| 93 | // one-line "parcelable X" .aidl declaration to be used in AIDL interfaces. |
| 94 | // TODO(b/180293679): remove these dependencies as they should not be necessary once |
| 95 | // the module builds against API (the parcelable declarations exist in framework.aidl) |
| 96 | "frameworks/base/core/java", // For framework parcelables |
| 97 | "frameworks/native/aidl/binder", // For PersistableBundle.aidl |
| 98 | ], |
| 99 | }, |
| 100 | libs: [ |
| 101 | "unsupportedappusage", |
| 102 | ], |
| 103 | permitted_packages: ["android.net", "com.android.connectivity.aidl"], |
| 104 | } |
Remi NGUYEN VAN | eb6aa22 | 2021-03-14 12:56:26 +0900 | [diff] [blame] | 105 | |
| 106 | java_library { |
| 107 | name: "framework-connectivity.impl", |
| 108 | // Instead of building against private API (framework.jar), |
| 109 | // build against core_platform + framework-minus-apex + module |
| 110 | // stub libs. This allows framework.jar to depend on this library, |
| 111 | // so it can be part of the private API until all clients have been migrated. |
| 112 | // TODO: just build against module_api, and remove this jar from |
| 113 | // the private API. |
| 114 | sdk_version: "core_platform", |
| 115 | srcs: [ |
| 116 | ":framework-connectivity-sources", |
| 117 | ], |
| 118 | aidl: { |
| 119 | include_dirs: [ |
| 120 | "frameworks/base/core/java", // For framework parcelables |
| 121 | "frameworks/native/aidl/binder", // For PersistableBundle.aidl |
| 122 | ], |
| 123 | }, |
| 124 | libs: [ |
| 125 | "framework-minus-apex", |
| 126 | // TODO: just framework-tethering, framework-wifi when building against module_api |
| 127 | "framework-tethering.stubs.module_lib", |
| 128 | "framework-wifi.stubs.module_lib", |
| 129 | "unsupportedappusage", |
| 130 | "ServiceConnectivityResources", |
| 131 | ], |
| 132 | static_libs: [ |
Remi NGUYEN VAN | f96b266 | 2021-03-14 15:28:10 +0900 | [diff] [blame^] | 133 | "framework-connectivity-protos", |
Remi NGUYEN VAN | eb6aa22 | 2021-03-14 12:56:26 +0900 | [diff] [blame] | 134 | "net-utils-device-common", |
| 135 | ], |
| 136 | jarjar_rules: "jarjar-rules.txt", |
| 137 | apex_available: ["com.android.tethering"], |
| 138 | installable: true, |
| 139 | permitted_packages: ["android.net", "com.android.connectivity.aidl"], |
| 140 | } |