• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2021 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
17package {
18    default_team: "trendy_team_updatable_sdk_apis",
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22python_binary_host {
23    name: "gen_sdk",
24    srcs: ["gen_sdk.py"],
25    libs: ["sdk_proto_python"],
26}
27
28sh_test_host {
29    name: "gen_sdk_test",
30    src: "gen_sdk_test.sh",
31    data: [
32        "extensions_db.textpb",
33        "testdata/**/*",
34    ],
35    data_bins: [
36        "gen_sdk",
37        "toybox",
38    ],
39    // libcrypto and libz are required by toybox.
40    data_libs: [
41        "libcrypto",
42        "libz",
43    ],
44    test_suites: ["general-tests"],
45}
46
47genrule {
48    name: "extensions_db.pb",
49    srcs: ["extensions_db.textpb"],
50    out: ["extensions_db.pb"],
51    tools: ["gen_sdk"],
52    cmd: "$(location gen_sdk) --action print_binary --database $(location extensions_db.textpb) > $(out)",
53}
54
55prebuilt_etc {
56    name: "extensions_db",
57    src: ":extensions_db.pb",
58    filename: "extensions_db.pb",
59    installable: false,
60}
61