Jiyong Park | da6ab6e | 2018-08-14 23:44:51 +0900 | [diff] [blame] | 1 | // 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 Light | a816f1e | 2019-02-27 14:11:20 -0800 | [diff] [blame] | 15 | apexer_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 Stjernholm | 8b29252 | 2019-03-29 16:17:37 +0000 | [diff] [blame] | 26 | // TODO(b/124476339) apex doesn't follow 'required' dependencies so we need to include this |
Alex Light | a816f1e | 2019-02-27 14:11:20 -0800 | [diff] [blame] | 27 | // manually for 'avbtool'. |
| 28 | "fec", |
| 29 | ] |
| 30 | |
Jooyung Han | 4ebf219 | 2019-12-03 19:28:12 +0900 | [diff] [blame] | 31 | python_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 Park | da6ab6e | 2018-08-14 23:44:51 +0900 | [diff] [blame] | 49 | python_binary_host { |
| 50 | name: "apexer", |
| 51 | srcs: [ |
| 52 | "apexer.py", |
| 53 | ], |
| 54 | version: { |
| 55 | py2: { |
| 56 | enabled: true, |
Dario Freni | adbee5d | 2018-12-27 12:44:01 +0000 | [diff] [blame] | 57 | embedded_launcher: true, |
Jiyong Park | da6ab6e | 2018-08-14 23:44:51 +0900 | [diff] [blame] | 58 | }, |
| 59 | py3: { |
| 60 | enabled: false, |
| 61 | }, |
| 62 | }, |
Dario Freni | adbee5d | 2018-12-27 12:44:01 +0000 | [diff] [blame] | 63 | libs: [ |
Jooyung Han | 4ebf219 | 2019-12-03 19:28:12 +0900 | [diff] [blame] | 64 | "apex_manifest", |
Dario Freni | ed536ee | 2020-01-02 18:52:59 +0000 | [diff] [blame] | 65 | "apex_build_info_proto", |
Baligh Uddin | 68f16e5 | 2020-02-19 21:39:33 -0800 | [diff] [blame] | 66 | "manifest_utils", |
Dario Freni | adbee5d | 2018-12-27 12:44:01 +0000 | [diff] [blame] | 67 | ], |
Alex Light | a816f1e | 2019-02-27 14:11:20 -0800 | [diff] [blame] | 68 | required: apexer_tools, |
Jiyong Park | da6ab6e | 2018-08-14 23:44:51 +0900 | [diff] [blame] | 69 | } |
Alex Light | a816f1e | 2019-02-27 14:11:20 -0800 | [diff] [blame] | 70 | |
Jooyung Han | cd4d81e | 2019-11-02 02:47:22 +0900 | [diff] [blame] | 71 | python_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 Light | a816f1e | 2019-02-27 14:11:20 -0800 | [diff] [blame] | 90 | apex_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. |
| 98 | apex_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 Uddin | 68f16e5 | 2020-02-19 21:39:33 -0800 | [diff] [blame] | 107 | } |
Dario Freni | 857738f | 2020-01-23 10:03:25 +0000 | [diff] [blame] | 108 | |
| 109 | // TODO(b/148659029): this test can't run in TEST_MAPPING. |
| 110 | python_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 Ioffe | 81df65e | 2020-03-23 22:04:50 +0000 | [diff] [blame] | 119 | ":com.android.example-logging_parent.apex", |
| 120 | ":com.android.example-overridden_package_name.apex", |
Dario Freni | 857738f | 2020-01-23 10:03:25 +0000 | [diff] [blame] | 121 | "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 Islam | 2cc12eb | 2020-02-27 17:26:59 +0000 | [diff] [blame] | 135 | libs: [ |
| 136 | "apex_manifest", |
| 137 | ], |
Dario Freni | 857738f | 2020-01-23 10:03:25 +0000 | [diff] [blame] | 138 | required: [ |
| 139 | "apexer", |
| 140 | "deapexer" |
| 141 | ], |
| 142 | } |