blob: 5c7bfc7e7a8396fa9f09ab94260c07f9443ca9ba [file] [log] [blame]
Herbert Xue3ed0ce72025-03-07 16:09:13 +08001// Copyright (C) 2025 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 // See: http://go/android-license-faq
17 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20java_genrule_host {
21 name: "otatools_package_dep_jars",
22 tools: ["soong_zip"],
23 compile_multilib: "first",
24 cmd: "mkdir -p $(genDir)/framework && " +
25 "cp $(in) $(genDir)/framework && " +
26 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)/framework",
27 srcs: [
28 ":apksigner",
29 ":boot_signer",
30 ":signapk",
31 ":verity_signer",
32 ],
33 out: ["otatools_package_dep_jars.zip"],
34}
35
36genrule {
37 name: "otatools_package_cert_files",
38 tools: ["soong_zip"],
39 cmd: "mkdir -p $(genDir)/tmp/ && " +
40 "echo $(in) > $(genDir)/tmp/zip_files.list && " +
41 "$(location soong_zip) -o $(out) -l $(genDir)/tmp/zip_files.list ",
42 srcs: [
43 ":soong_generated_otatools_package_filegroup",
44 ],
45 out: ["otatools_package_cert_files.zip"],
46}
47
48java_genrule_host {
49 name: "otatools_package",
50 tools: ["merge_zips"],
51 compile_multilib: "first",
52 cmd: "$(location merge_zips) $(out) $(in)",
53 srcs: [
54 ":otatools_package_cert_files",
55 ":otatools_package_dep_jars",
Herbert Xue3ed0ce72025-03-07 16:09:13 +080056 ":otatools_package_releasetools",
57 ],
58 // TODO: Rename as "otatools.zip" when the rest files are ready.
59 out: ["otatools_temp.zip"],
60 dist: {
61 targets: [
62 "otatools-package-temp",
63 ],
64 },
65}