// Copyright (C) 2020 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. package { default_applicable_licenses: ["Android-Apache-2.0"], } apex_key { name: "com.android.apex.test.pony.key", public_key: "com.android.apex.test.pony.avbpubkey", private_key: "com.android.apex.test.pony.pem", } android_app_certificate { name: "com.android.apex.test.pony.certificate", certificate: "com.android.apex.test.pony", } apex { name: "com.android.apex.test.pony", manifest: "manifest.json", file_contexts: ":apex.test-file_contexts", key: "com.android.apex.test.pony.key", installable: false, binaries: ["pony_test"], dist: { targets: ["sharedlibs_test"], }, updatable: false, } cc_binary { name: "pony_test", srcs: ["pony_test.cc"], shared_libs: [ "libsharedlibtest", ], apex_available: ["com.android.apex.test.pony"], } genrule { name: "com.android.apex.test.pony_stripped", out: ["com.android.apex.test.pony_stripped.apex"], defaults: ["apexer_test_host_tools_list"], dist: { targets: ["sharedlibs_test"], }, srcs: [ ":com.android.apex.test.pony", "com.android.apex.test.pony.avbpubkey", "com.android.apex.test.pony.pem", "com.android.apex.test.pony.pk8", "com.android.apex.test.pony.x509.pem", ], tools: [ "shared_libs_repack", ], cmd: "$(location shared_libs_repack) " + " --mode strip" + " --key $(location com.android.apex.test.pony.pem)" + " --input $(location :com.android.apex.test.pony)" + " --output $(genDir)/com.android.apex.test.pony_stripped.apex" + " --pk8key $(location com.android.apex.test.pony.pk8)" + " --pubkey $(location com.android.apex.test.pony.avbpubkey)" + " --x509key $(location com.android.apex.test.pony.x509.pem)" + " --tmpdir $(genDir)", }