blob: 017ff51f366d32e1b0c219cf79caa041e50fc803 [file] [log] [blame]
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +09001//
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 Badour6c7ed9d2021-02-12 17:07:05 -080017package {
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 VANf96b2662021-03-14 15:28:10 +090026java_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 VAN66ea68e2021-01-15 16:22:36 +090045filegroup {
Remi NGUYEN VAN6916d512021-02-15 20:16:28 +090046 name: "framework-connectivity-internal-sources",
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090047 srcs: [
48 "src/**/*.java",
49 "src/**/*.aidl",
50 ],
51 path: "src",
52 visibility: [
Remi NGUYEN VAN6916d512021-02-15 20:16:28 +090053 "//visibility:private",
54 ],
55}
56
57filegroup {
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
69filegroup {
70 name: "framework-connectivity-sources",
71 srcs: [
72 ":framework-connectivity-internal-sources",
73 ":framework-connectivity-aidl-export-sources",
74 ],
75 visibility: [
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090076 "//frameworks/base",
77 "//packages/modules/Connectivity:__subpackages__",
78 ],
Bob Badour6c7ed9d2021-02-12 17:07:05 -080079}
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090080
81java_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 VANeb6aa222021-03-14 12:56:26 +0900105
106java_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 VANf96b2662021-03-14 15:28:10 +0900133 "framework-connectivity-protos",
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900134 "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}