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}
18
19apex {
20    name: "com.android.sdkext",
21    defaults: [ "com.android.sdkext-defaults" ],
22    binaries: [ "derive_sdk" ],
23    java_libs: [ "framework-sdkextensions" ],
24    prebuilts: [ "cur_sdkinfo" ],
25    manifest: "manifest.json",
26    min_sdk_version: "current",
27}
28
29apex_defaults {
30    name: "com.android.sdkext-defaults",
31    updatable: true,
32    min_sdk_version: "R",
33    prebuilts: [
34        "derive_sdk.rc",
35    ],
36    key: "com.android.sdkext.key",
37    certificate: ":com.android.sdkext.certificate",
38}
39
40apex_key {
41    name: "com.android.sdkext.key",
42    public_key: "com.android.sdkext.avbpubkey",
43    private_key: "com.android.sdkext.pem",
44}
45
46android_app_certificate {
47    name: "com.android.sdkext.certificate",
48    certificate: "com.android.sdkext",
49}
50
51python_binary_host {
52    name: "gen_sdkinfo",
53    srcs: [
54        "sdk.proto",
55        "gen_sdkinfo.py",
56    ],
57    proto: {
58        canonical_path_from_root: false,
59    },
60    version: {
61        py3: {
62            embedded_launcher: true,
63        },
64    },
65}
66
67gensrcs {
68    name: "cur_sdkinfo_src",
69    srcs: [""],
70    tools: [ "gen_sdkinfo" ],
71    cmd: "$(location) -v 0 -o $(out)",
72}
73
74prebuilt_etc {
75    name: "cur_sdkinfo",
76    src: ":cur_sdkinfo_src",
77    filename: "sdkinfo.binarypb",
78    installable: false,
79}
80