blob: 5b333288339c87974877a366736bc59a58d2f598 [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 Badour727b6722021-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 VAN8c2d5212021-03-14 15:28:10 +090026java_library {
27 name: "framework-connectivity-protos",
Remi NGUYEN VAN3b52af92021-03-19 00:24:45 +000028 sdk_version: "module_current",
Remi NGUYEN VAN8c2d5212021-03-14 15:28:10 +090029 proto: {
30 type: "nano",
31 },
32 srcs: [
33 // TODO: consider moving relevant .proto files directly to the module directory
34 ":framework-javastream-protos",
35 ],
36 apex_available: [
37 "//apex_available:platform",
38 "com.android.tethering",
39 ],
40 jarjar_rules: "jarjar-rules-proto.txt",
41 visibility: [
42 "//visibility:private",
43 ],
44}
45
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090046filegroup {
Remi NGUYEN VANad43ca62021-02-15 20:16:28 +090047 name: "framework-connectivity-internal-sources",
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090048 srcs: [
49 "src/**/*.java",
50 "src/**/*.aidl",
51 ],
52 path: "src",
53 visibility: [
Remi NGUYEN VANad43ca62021-02-15 20:16:28 +090054 "//visibility:private",
55 ],
56}
57
58filegroup {
59 name: "framework-connectivity-aidl-export-sources",
60 srcs: [
61 "aidl-export/**/*.aidl",
62 ],
63 path: "aidl-export",
64 visibility: [
65 "//visibility:private",
66 ],
67}
68
69// TODO: use a java_library in the bootclasspath instead
70filegroup {
71 name: "framework-connectivity-sources",
72 srcs: [
73 ":framework-connectivity-internal-sources",
74 ":framework-connectivity-aidl-export-sources",
75 ],
76 visibility: [
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090077 "//frameworks/base",
78 "//packages/modules/Connectivity:__subpackages__",
79 ],
Bob Badour727b6722021-02-12 17:07:05 -080080}
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090081
82java_sdk_library {
83 name: "framework-connectivity",
84 api_only: true,
85 defaults: ["framework-module-defaults"],
Remi NGUYEN VAN3b52af92021-03-19 00:24:45 +000086 installable: true,
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090087 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 ],
Remi NGUYEN VAN3b52af92021-03-19 00:24:45 +0000103 permitted_packages: [
104 "android.net",
105 "com.android.connectivity.aidl",
106 ],
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +0900107}
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900108
109java_library {
110 name: "framework-connectivity.impl",
Remi NGUYEN VAN3b52af92021-03-19 00:24:45 +0000111 sdk_version: "module_current",
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900112 srcs: [
113 ":framework-connectivity-sources",
114 ],
115 aidl: {
116 include_dirs: [
117 "frameworks/base/core/java", // For framework parcelables
118 "frameworks/native/aidl/binder", // For PersistableBundle.aidl
119 ],
120 },
121 libs: [
Remi NGUYEN VAN3b52af92021-03-19 00:24:45 +0000122 // TODO (b/183097033) remove once module_current includes core_current
123 "stable.core.platform.api.stubs",
124 "framework-tethering",
125 "framework-wifi",
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900126 "unsupportedappusage",
127 "ServiceConnectivityResources",
128 ],
129 static_libs: [
Remi NGUYEN VAN8c2d5212021-03-14 15:28:10 +0900130 "framework-connectivity-protos",
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900131 "net-utils-device-common",
132 ],
133 jarjar_rules: "jarjar-rules.txt",
134 apex_available: ["com.android.tethering"],
135 installable: true,
Remi NGUYEN VAN3b52af92021-03-19 00:24:45 +0000136 permitted_packages: [
137 "android.net",
138 "com.android.connectivity.aidl",
139 ],
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +0900140}