• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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 {
16    default_team: "trendy_team_updatable_sdk_apis",
17    default_visibility: [":__subpackages__"],
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21apex {
22    name: "com.android.sdkext",
23    defaults: ["com.android.sdkext-defaults"],
24    bootclasspath_fragments: ["com.android.sdkext-bootclasspath-fragment"],
25    binaries: [
26        "derive_classpath",
27        "derive_sdk",
28    ],
29    prebuilts: [
30        "current_sdkinfo",
31        "extensions_db",
32    ],
33    manifest: "manifest.json",
34    visibility: ["//packages/modules/common/build"],
35}
36
37apex_defaults {
38    name: "com.android.sdkext-defaults",
39    defaults: ["r-launched-apex-module"],
40    prebuilts: [
41        "derive_classpath.rc",
42        "derive_sdk.rc",
43    ],
44    key: "com.android.sdkext.key",
45    certificate: ":com.android.sdkext.certificate",
46}
47
48apex_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
59sdk {
60    name: "sdkextensions-sdk",
61    apexes: [
62        // Adds exportable dependencies of the APEX to the sdk,
63        // e.g. *classpath_fragments.
64        "com.android.sdkext",
65    ],
66}
67
68module_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
90// 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"],
95
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    ],
103
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    },
118}
119
120filegroup {
121    name: "sdk-extensions-info",
122    srcs: ["sdk-extensions-info.xml"],
123    visibility: [
124        "//frameworks/base",
125        "//frameworks/base/api",
126    ],
127}
128
129java_test_host {
130    name: "sdkextensions_conformance_framework_tests",
131    static_libs: ["ClasspathFetcher"],
132    libs: [
133        "tradefed",
134        "truth",
135    ],
136    test_config: "sdkext-conformance-framework.xml",
137    test_suites: [
138        "mts",
139        "device-tests",
140    ],
141}
142