blob: a33aade4edd9157bb7a0c757a3c1e1333672b7d5 [file] [log] [blame]
Jiyong Parkda6ab6e2018-08-14 23:44:51 +09001// Copyright (C) 2018 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
Alex Lighta816f1e2019-02-27 14:11:20 -080015apexer_tools = [
16 "apexer",
17 "aapt2",
18 "avbtool",
19 "e2fsdroid",
20 "merge_zips",
21 "mke2fs",
22 "resize2fs",
23 "sefcontext_compile",
24 "soong_zip",
25 "zipalign",
Martin Stjernholm8b292522019-03-29 16:17:37 +000026 // TODO(b/124476339) apex doesn't follow 'required' dependencies so we need to include this
Alex Lighta816f1e2019-02-27 14:11:20 -080027 // manually for 'avbtool'.
28 "fec",
29]
30
Jooyung Han4ebf2192019-12-03 19:28:12 +090031python_library_host {
32 name: "apex_manifest",
33 srcs: [
34 "apex_manifest.py",
35 ],
36 version: {
37 py2: {
38 enabled: true,
39 },
40 py3: {
41 enabled: true,
42 },
43 },
44 libs: [
45 "apex_manifest_proto",
46 ],
47}
48
Jiyong Parkda6ab6e2018-08-14 23:44:51 +090049python_binary_host {
50 name: "apexer",
51 srcs: [
52 "apexer.py",
53 ],
54 version: {
55 py2: {
56 enabled: true,
Dario Freniadbee5d2018-12-27 12:44:01 +000057 embedded_launcher: true,
Jiyong Parkda6ab6e2018-08-14 23:44:51 +090058 },
59 py3: {
60 enabled: false,
61 },
62 },
Dario Freniadbee5d2018-12-27 12:44:01 +000063 libs: [
Jooyung Han4ebf2192019-12-03 19:28:12 +090064 "apex_manifest",
Dario Frenied536ee2020-01-02 18:52:59 +000065 "apex_build_info_proto",
Baligh Uddin68f16e52020-02-19 21:39:33 -080066 "manifest_utils",
Dario Freniadbee5d2018-12-27 12:44:01 +000067 ],
Alex Lighta816f1e2019-02-27 14:11:20 -080068 required: apexer_tools,
Jiyong Parkda6ab6e2018-08-14 23:44:51 +090069}
Alex Lighta816f1e2019-02-27 14:11:20 -080070
Jooyung Hancd4d81e2019-11-02 02:47:22 +090071python_binary_host {
72 name: "conv_apex_manifest",
73 srcs: [
74 "conv_apex_manifest.py",
75 ],
76 version: {
77 py2: {
78 enabled: true,
79 embedded_launcher: true,
80 },
81 py3: {
82 enabled: false,
83 },
84 },
85 libs: [
86 "apex_manifest_proto",
87 ],
88}
89
Alex Lighta816f1e2019-02-27 14:11:20 -080090apex_key {
91 name: "com.android.support.apexer.key",
92 public_key: "etc/com.android.support.apexer.avbpubkey",
93 private_key: "etc/com.android.support.apexer.pem",
94}
95
96// This is a host-apex that contains all the binaries needed to create new apex's seprate from
97// soong.
98apex_test {
99 name: "com.android.support.apexer",
100 payload_type: "zip",
101 host_supported: true,
102 device_supported: false,
103 manifest: "etc/manifest.json",
104 ignore_system_library_special_case: true,
105 key: "com.android.support.apexer.key",
106 binaries: apexer_tools,
Baligh Uddin68f16e52020-02-19 21:39:33 -0800107}
Dario Freni857738f2020-01-23 10:03:25 +0000108
109// TODO(b/148659029): this test can't run in TEST_MAPPING.
110python_test_host {
111 name: "apexer_test",
112 main: "apexer_test.py",
113 srcs: [
114 "apexer_test.py",
115 ],
116 data: [
117 ":com.android.example.apex",
118 ":com.android.example-legacy.apex",
Nikita Ioffe81df65e2020-03-23 22:04:50 +0000119 ":com.android.example-logging_parent.apex",
120 ":com.android.example-overridden_package_name.apex",
Dario Freni857738f2020-01-23 10:03:25 +0000121 "testdata/com.android.example.apex.avbpubkey",
122 "testdata/com.android.example.apex.pem",
123 "testdata/com.android.example.apex.pk8",
124 "testdata/com.android.example.apex.x509.pem",
125 ],
126 version: {
127 py2: {
128 enabled: false,
129 },
130 py3: {
131 enabled: true,
132 },
133 },
134 test_suites: ["general-tests"],
Mohammad Samiul Islam2cc12eb2020-02-27 17:26:59 +0000135 libs: [
136 "apex_manifest",
137 ],
Dario Freni857738f2020-01-23 10:03:25 +0000138 required: [
139 "apexer",
140 "deapexer"
141 ],
142}