blob: 86433e1c38f8727b529a7f306258e83740150a3b [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 VAN66ea68e2021-01-15 16:22:36 +090026filegroup {
Remi NGUYEN VAN6916d512021-02-15 20:16:28 +090027 name: "framework-connectivity-internal-sources",
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090028 srcs: [
29 "src/**/*.java",
30 "src/**/*.aidl",
31 ],
32 path: "src",
33 visibility: [
Remi NGUYEN VAN6916d512021-02-15 20:16:28 +090034 "//visibility:private",
35 ],
36}
37
38filegroup {
39 name: "framework-connectivity-aidl-export-sources",
40 srcs: [
41 "aidl-export/**/*.aidl",
42 ],
43 path: "aidl-export",
44 visibility: [
45 "//visibility:private",
46 ],
47}
48
49// TODO: use a java_library in the bootclasspath instead
50filegroup {
51 name: "framework-connectivity-sources",
52 srcs: [
53 ":framework-connectivity-internal-sources",
54 ":framework-connectivity-aidl-export-sources",
55 ],
56 visibility: [
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090057 "//frameworks/base",
58 "//packages/modules/Connectivity:__subpackages__",
59 ],
Bob Badour6c7ed9d2021-02-12 17:07:05 -080060}
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090061
62java_sdk_library {
63 name: "framework-connectivity",
64 api_only: true,
65 defaults: ["framework-module-defaults"],
66 // TODO: build against module API
67 platform_apis: true,
68 srcs: [
69 ":framework-connectivity-sources",
70 ],
71 aidl: {
72 include_dirs: [
73 // Include directories for parcelables that are part of the stable API, and need a
74 // one-line "parcelable X" .aidl declaration to be used in AIDL interfaces.
75 // TODO(b/180293679): remove these dependencies as they should not be necessary once
76 // the module builds against API (the parcelable declarations exist in framework.aidl)
77 "frameworks/base/core/java", // For framework parcelables
78 "frameworks/native/aidl/binder", // For PersistableBundle.aidl
79 ],
80 },
81 libs: [
82 "unsupportedappusage",
83 ],
84 permitted_packages: ["android.net", "com.android.connectivity.aidl"],
85}
Remi NGUYEN VANeb6aa222021-03-14 12:56:26 +090086
87java_library {
88 name: "framework-connectivity.impl",
89 // Instead of building against private API (framework.jar),
90 // build against core_platform + framework-minus-apex + module
91 // stub libs. This allows framework.jar to depend on this library,
92 // so it can be part of the private API until all clients have been migrated.
93 // TODO: just build against module_api, and remove this jar from
94 // the private API.
95 sdk_version: "core_platform",
96 srcs: [
97 ":framework-connectivity-sources",
98 ],
99 aidl: {
100 include_dirs: [
101 "frameworks/base/core/java", // For framework parcelables
102 "frameworks/native/aidl/binder", // For PersistableBundle.aidl
103 ],
104 },
105 libs: [
106 "framework-minus-apex",
107 // TODO: just framework-tethering, framework-wifi when building against module_api
108 "framework-tethering.stubs.module_lib",
109 "framework-wifi.stubs.module_lib",
110 "unsupportedappusage",
111 "ServiceConnectivityResources",
112 ],
113 static_libs: [
114 "net-utils-device-common",
115 ],
116 jarjar_rules: "jarjar-rules.txt",
117 apex_available: ["com.android.tethering"],
118 installable: true,
119 permitted_packages: ["android.net", "com.android.connectivity.aidl"],
120}