blob: ccfc4c99a3473c65e671ed3abc1bc58a320ffce7 [file] [log] [blame]
Victor Hsiehe82b9fb2019-02-06 09:56:58 -08001// 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
Bob Badour051ef782021-02-12 17:07:05 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "frameworks_base_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 // SPDX-license-identifier-MIT
22 // SPDX-license-identifier-Unicode-DFS
23 default_applicable_licenses: ["frameworks_base_license"],
24}
25
Victor Hsiehe82b9fb2019-02-06 09:56:58 -080026filegroup {
27 name: "ApkVerityTestKeyPem",
28 srcs: ["ApkVerityTestKey.pem"],
29}
30
31filegroup {
32 name: "ApkVerityTestCertPem",
33 srcs: ["ApkVerityTestCert.pem"],
34}
35
36filegroup {
37 name: "ApkVerityTestCertDer",
38 srcs: ["ApkVerityTestCert.der"],
39}
40
41filegroup {
42 name: "ApkVerityTestAppDm",
43 srcs: ["ApkVerityTestApp.dm"],
44}
45
46filegroup {
47 name: "ApkVerityTestAppSplitDm",
48 srcs: ["ApkVerityTestAppSplit.dm"],
49}
50
51genrule_defaults {
52 name: "apk_verity_sig_gen_default",
53 tools: ["fsverity"],
54 tool_files: [":ApkVerityTestKeyPem", ":ApkVerityTestCertPem"],
55 cmd: "$(location fsverity) sign $(in) $(out) " +
56 "--key=$(location :ApkVerityTestKeyPem) " +
57 "--cert=$(location :ApkVerityTestCertPem) " +
58 "> /dev/null",
59}
60
61genrule {
62 name: "ApkVerityTestAppFsvSig",
63 defaults: ["apk_verity_sig_gen_default"],
64 srcs: [":ApkVerityTestApp"],
65 out: ["ApkVerityTestApp.apk.fsv_sig"],
66}
67
68genrule {
69 name: "ApkVerityTestAppDmFsvSig",
70 defaults: ["apk_verity_sig_gen_default"],
71 srcs: [":ApkVerityTestAppDm"],
72 out: ["ApkVerityTestApp.dm.fsv_sig"],
73}
74
75genrule {
76 name: "ApkVerityTestAppSplitFsvSig",
77 defaults: ["apk_verity_sig_gen_default"],
78 srcs: [":ApkVerityTestAppSplit"],
79 out: ["ApkVerityTestAppSplit.apk.fsv_sig"],
80}
81
82genrule {
83 name: "ApkVerityTestAppSplitDmFsvSig",
84 defaults: ["apk_verity_sig_gen_default"],
85 srcs: [":ApkVerityTestAppSplitDm"],
86 out: ["ApkVerityTestAppSplit.dm.fsv_sig"],
87}