// Copyright (C) 2018 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. apexer_tools = [ "apexer", "aapt2", "avbtool", "e2fsdroid", "merge_zips", "mke2fs", "resize2fs", "sefcontext_compile", "soong_zip", "zipalign", // TODO(b/124476339) apex doesn't follow 'required' dependencies so we need to include this // manually for 'avbtool'. "fec", ] python_library_host { name: "apex_manifest", srcs: [ "apex_manifest.py", ], version: { py2: { enabled: true, }, py3: { enabled: true, }, }, libs: [ "apex_manifest_proto", ], } python_binary_host { name: "apexer", srcs: [ "apexer.py", ], version: { py2: { enabled: true, embedded_launcher: true, }, py3: { enabled: false, }, }, libs: [ "apex_manifest", "apex_build_info_proto", "manifest_utils", ], required: apexer_tools, } python_binary_host { name: "conv_apex_manifest", srcs: [ "conv_apex_manifest.py", ], version: { py2: { enabled: true, embedded_launcher: true, }, py3: { enabled: false, }, }, libs: [ "apex_manifest_proto", ], } apex_key { name: "com.android.support.apexer.key", public_key: "etc/com.android.support.apexer.avbpubkey", private_key: "etc/com.android.support.apexer.pem", } // This is a host-apex that contains all the binaries needed to create new apex's seprate from // soong. apex_test { name: "com.android.support.apexer", payload_type: "zip", host_supported: true, device_supported: false, manifest: "etc/manifest.json", ignore_system_library_special_case: true, key: "com.android.support.apexer.key", binaries: apexer_tools, } // TODO(b/148659029): this test can't run in TEST_MAPPING. python_test_host { name: "apexer_test", main: "apexer_test.py", srcs: [ "apexer_test.py", ], data: [ ":com.android.example.apex", ":com.android.example-legacy.apex", ":com.android.example-logging_parent.apex", ":com.android.example-overridden_package_name.apex", "testdata/com.android.example.apex.avbpubkey", "testdata/com.android.example.apex.pem", "testdata/com.android.example.apex.pk8", "testdata/com.android.example.apex.x509.pem", ], version: { py2: { enabled: false, }, py3: { enabled: true, }, }, test_suites: ["general-tests"], libs: [ "apex_manifest", ], required: [ "apexer", "deapexer" ], }