blob: ab8a3570f01c9fd3356718df280a32d82d8ac150 [file] [log] [blame]
Anton Hanssonda4972f2020-01-08 09:48:18 +00001// 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
15package {
Ronish Kalia45efc302024-02-14 14:17:36 +000016 default_team: "trendy_team_updatable_sdk_apis",
Anton Hanssonda4972f2020-01-08 09:48:18 +000017 default_visibility: [":__subpackages__"],
Bob Badourbe5b7072021-02-12 14:50:30 -080018 default_applicable_licenses: ["Android-Apache-2.0"],
Anton Hanssonda4972f2020-01-08 09:48:18 +000019}
20
21apex {
22 name: "com.android.sdkext",
Paul Duffinc9d11fc2021-05-17 13:19:48 +010023 defaults: ["com.android.sdkext-defaults"],
satayev9a5c4412021-05-12 13:30:40 +010024 bootclasspath_fragments: ["com.android.sdkext-bootclasspath-fragment"],
Anton Hansson4c639682021-05-27 10:01:34 +000025 binaries: [
26 "derive_classpath",
27 "derive_sdk",
28 ],
Anton Hansson16097ea2021-01-12 20:34:32 +000029 prebuilts: [
Anton Hansson1f555ec2021-05-24 12:27:02 +010030 "current_sdkinfo",
Anton Hansson16097ea2021-01-12 20:34:32 +000031 "extensions_db",
32 ],
Anton Hansson36e2b132019-12-19 12:10:53 +000033 manifest: "manifest.json",
Jeongik Cha8691ef52024-03-12 19:35:14 +090034 visibility: ["//packages/modules/common/build"],
Anton Hansson36e2b132019-12-19 12:10:53 +000035}
36
37apex_defaults {
38 name: "com.android.sdkext-defaults",
Gurpreet Singh8b30b402022-03-02 16:26:44 +000039 defaults: ["r-launched-apex-module"],
Anton Hanssonda4972f2020-01-08 09:48:18 +000040 prebuilts: [
satayevbe3f8ea2021-03-19 11:08:49 +000041 "derive_classpath.rc",
Anton Hansson36e2b132019-12-19 12:10:53 +000042 "derive_sdk.rc",
Anton Hanssonda4972f2020-01-08 09:48:18 +000043 ],
44 key: "com.android.sdkext.key",
45 certificate: ":com.android.sdkext.certificate",
46}
47
Anton Hanssonda4972f2020-01-08 09:48:18 +000048apex_key {
49 name: "com.android.sdkext.key",
50 public_key: "com.android.sdkext.avbpubkey",
51 private_key: "com.android.sdkext.pem",
52}
53
54android_app_certificate {
55 name: "com.android.sdkext.certificate",
56 certificate: "com.android.sdkext",
57}
58
Anton Hansson966175d2020-11-09 15:03:34 +000059sdk {
60 name: "sdkextensions-sdk",
Paul Duffin99af1f42022-07-13 11:18:49 +000061 apexes: [
62 // Adds exportable dependencies of the APEX to the sdk,
63 // e.g. *classpath_fragments.
64 "com.android.sdkext",
65 ],
Anton Hansson966175d2020-11-09 15:03:34 +000066}
satayev9a5c4412021-05-12 13:30:40 +010067
Jiakai Zhang12a30412025-02-19 14:57:42 +000068module_exports {
69 name: "sdkextensions-host-exports",
70 host_supported: true,
71 target: {
72 host: {
73 compile_multilib: "64",
74 native_binaries: [
75 "derive_classpath",
76 ],
77 },
78 linux_bionic: {
79 enabled: false,
80 },
81 darwin: {
82 enabled: false,
83 },
84 windows: {
85 enabled: false,
86 },
87 },
88}
89
satayev9a5c4412021-05-12 13:30:40 +010090// Encapsulate the contributions made by the com.android.sdkext to the bootclasspath.
91bootclasspath_fragment {
92 name: "com.android.sdkext-bootclasspath-fragment",
93 contents: ["framework-sdkextensions"],
94 apex_available: ["com.android.sdkext"],
Paul Duffin338c35f2021-05-17 12:48:35 +010095
96 // The bootclasspath_fragments that provide APIs on which this depends.
97 fragments: [
98 {
99 apex: "com.android.art",
100 module: "art-bootclasspath-fragment",
101 },
102 ],
Paul Duffinc024f032022-03-10 18:37:12 +0000103
104 hidden_api: {
105 // This module does not contain any split packages.
106 split_packages: [],
107
108 // The following packages and all their subpackages currently only
109 // contain classes from this bootclasspath_fragment. Listing a package
110 // here won't prevent other bootclasspath modules from adding classes in
111 // any of those packages but it will prevent them from adding those
112 // classes into an API surface, e.g. public, system, etc.. Doing so will
113 // result in a build failure due to inconsistent flags.
114 package_prefixes: [
115 "android.os.ext",
116 ],
117 },
satayev9a5c4412021-05-12 13:30:40 +0100118}
Mårten Kongstad2ff53582022-09-06 15:12:42 +0200119
120filegroup {
121 name: "sdk-extensions-info",
Mårten Kongstadfbb1e092022-11-08 12:29:11 +0100122 srcs: ["sdk-extensions-info.xml"],
Mårten Kongstad2ff53582022-09-06 15:12:42 +0200123 visibility: [
124 "//frameworks/base",
Anton Hanssond7c3c362023-03-03 17:56:45 +0000125 "//frameworks/base/api",
Mårten Kongstad2ff53582022-09-06 15:12:42 +0200126 ],
127}
Andrei Onea4f030a32022-11-03 15:26:22 +0000128
129java_test_host {
130 name: "sdkextensions_conformance_framework_tests",
131 static_libs: ["ClasspathFetcher"],
132 libs: [
133 "tradefed",
Krzysztof Kosiński1feb47f2023-10-07 00:48:19 +0000134 "truth",
Andrei Onea4f030a32022-11-03 15:26:22 +0000135 ],
136 test_config: "sdkext-conformance-framework.xml",
137 test_suites: [
138 "mts",
139 "device-tests",
140 ],
141}