1// Copyright (C) 2020 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. 14package { 15 default_applicable_licenses: ["Android-Apache-2.0"], 16} 17 18apex_key { 19 name: "com.android.apex.test.sharedlibs_secondary.key", 20 public_key: "com.android.apex.test.sharedlibs_secondary.avbpubkey", 21 private_key: "com.android.apex.test.sharedlibs_secondary.pem", 22} 23 24android_app_certificate { 25 name: "com.android.apex.test.sharedlibs_secondary.certificate", 26 certificate: "com.android.apex.test.sharedlibs_secondary", 27} 28 29apex { 30 name: "com.android.apex.test.sharedlibs_secondary_stub", 31 manifest: "manifest.json", 32 file_contexts: ":apex.test-file_contexts", 33 key: "com.android.apex.test.sharedlibs_secondary.key", 34 installable: false, 35 // We want to force libc++.so to be available in this stub APEX, so put an empty binary. 36 binaries: [ "noop" ], 37 updatable: false, 38} 39 40genrule { 41 name: "com.android.apex.test.sharedlibs_secondary_generated", 42 out: ["com.android.apex.test.sharedlibs_secondary_generated.apex"], 43 defaults: ["apexer_test_host_tools_list"], 44 dist: { 45 targets: ["sharedlibs_test"], 46 }, 47 srcs: [ 48 ":com.android.apex.test.sharedlibs_secondary_stub", 49 "com.android.apex.test.sharedlibs_secondary.avbpubkey", 50 "com.android.apex.test.sharedlibs_secondary.pem", 51 "com.android.apex.test.sharedlibs_secondary.pk8", 52 "com.android.apex.test.sharedlibs_secondary.x509.pem", 53 ], 54 tools: [ 55 "shared_libs_repack", 56 ], 57 cmd: "$(location shared_libs_repack) " + 58 " --mode sharedlibs" + 59 " --key $(location com.android.apex.test.sharedlibs_secondary.pem)" + 60 " --input $(location :com.android.apex.test.sharedlibs_secondary_stub)" + 61 " --output $(genDir)/com.android.apex.test.sharedlibs_secondary_generated.apex" + 62 " --pk8key $(location com.android.apex.test.sharedlibs_secondary.pk8)" + 63 " --pubkey $(location com.android.apex.test.sharedlibs_secondary.avbpubkey)" + 64 " --x509key $(location com.android.apex.test.sharedlibs_secondary.x509.pem)" + 65 " --tmpdir $(genDir)", 66} 67