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.key", 20 public_key: "com.android.apex.test.sharedlibs.avbpubkey", 21 private_key: "com.android.apex.test.sharedlibs.pem", 22} 23 24android_app_certificate { 25 name: "com.android.apex.test.sharedlibs.certificate", 26 certificate: "com.android.apex.test.sharedlibs", 27} 28 29apex { 30 name: "com.android.apex.test.sharedlibs_stub", 31 manifest: "manifest.json", 32 file_contexts: ":apex.test-file_contexts", 33 key: "com.android.apex.test.sharedlibs.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 compile_multilib: "both", 39 multilib: { 40 both: { 41 binaries: [ 42 "noop", 43 ], 44 }, 45 }, 46} 47 48genrule { 49 name: "com.android.apex.test.sharedlibs_generated", 50 out: ["com.android.apex.test.sharedlibs_generated.apex"], 51 defaults: ["apexer_test_host_tools_list"], 52 dist: { 53 targets: ["sharedlibs_test"], 54 }, 55 srcs: [ 56 ":com.android.apex.test.sharedlibs_stub", 57 "com.android.apex.test.sharedlibs.avbpubkey", 58 "com.android.apex.test.sharedlibs.pem", 59 "com.android.apex.test.sharedlibs.pk8", 60 "com.android.apex.test.sharedlibs.x509.pem", 61 ], 62 tools: [ 63 "shared_libs_repack", 64 ], 65 cmd: "$(location shared_libs_repack) " + 66 " --mode sharedlibs" + 67 " --key $(location com.android.apex.test.sharedlibs.pem)" + 68 " --input $(location :com.android.apex.test.sharedlibs_stub)" + 69 " --output $(genDir)/com.android.apex.test.sharedlibs_generated.apex" + 70 " --pk8key $(location com.android.apex.test.sharedlibs.pk8)" + 71 " --pubkey $(location com.android.apex.test.sharedlibs.avbpubkey)" + 72 " --x509key $(location com.android.apex.test.sharedlibs.x509.pem)" + 73 " --tmpdir $(genDir)", 74} 75