• 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_visibility: [":__subpackages__"],
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20apex {
21    name: "com.android.sdkext",
22    defaults: ["com.android.sdkext-defaults"],
23    bootclasspath_fragments: ["com.android.sdkext-bootclasspath-fragment"],
24    binaries: [
25        "derive_classpath",
26        "derive_sdk",
27    ],
28    prebuilts: [
29        "current_sdkinfo",
30        "extensions_db",
31    ],
32    manifest: "manifest.json",
33}
34
35apex_defaults {
36    name: "com.android.sdkext-defaults",
37    defaults: ["r-launched-apex-module"],
38    prebuilts: [
39        "derive_classpath.rc",
40        "derive_sdk.rc",
41    ],
42    key: "com.android.sdkext.key",
43    certificate: ":com.android.sdkext.certificate",
44}
45
46apex_key {
47    name: "com.android.sdkext.key",
48    public_key: "com.android.sdkext.avbpubkey",
49    private_key: "com.android.sdkext.pem",
50}
51
52android_app_certificate {
53    name: "com.android.sdkext.certificate",
54    certificate: "com.android.sdkext",
55}
56
57sdk {
58    name: "sdkextensions-sdk",
59    apexes: [
60        // Adds exportable dependencies of the APEX to the sdk,
61        // e.g. *classpath_fragments.
62        "com.android.sdkext",
63    ],
64}
65
66// Encapsulate the contributions made by the com.android.sdkext to the bootclasspath.
67bootclasspath_fragment {
68    name: "com.android.sdkext-bootclasspath-fragment",
69    contents: ["framework-sdkextensions"],
70    apex_available: ["com.android.sdkext"],
71
72    // The bootclasspath_fragments that provide APIs on which this depends.
73    fragments: [
74        {
75            apex: "com.android.art",
76            module: "art-bootclasspath-fragment",
77        },
78    ],
79
80    hidden_api: {
81        // This module does not contain any split packages.
82        split_packages: [],
83
84        // The following packages and all their subpackages currently only
85        // contain classes from this bootclasspath_fragment. Listing a package
86        // here won't prevent other bootclasspath modules from adding classes in
87        // any of those packages but it will prevent them from adding those
88        // classes into an API surface, e.g. public, system, etc.. Doing so will
89        // result in a build failure due to inconsistent flags.
90        package_prefixes: [
91            "android.os.ext",
92        ],
93    },
94}
95
96filegroup {
97    name: "sdk-extensions-info",
98    srcs: ["sdk-extensions-info.xml"],
99    visibility: [
100        "//frameworks/base",
101        "//frameworks/base/api",
102    ],
103}
104
105java_test_host {
106    name: "sdkextensions_conformance_framework_tests",
107    static_libs: ["ClasspathFetcher"],
108    libs: [
109        "tradefed",
110        "truth-prebuilt",
111    ],
112    test_config: "sdkext-conformance-framework.xml",
113    test_suites: [
114        "mts",
115        "device-tests",
116    ],
117}
118