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 15// Defaults shared between real and test versions of the APEX. 16package { 17 // See: http://go/android-license-faq 18 // A large-scale-change added 'default_applicable_licenses' to import 19 // all of the 'license_kinds' from "external_conscrypt_license" 20 // to get the below license kinds: 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["external_conscrypt_license"], 23} 24 25apex_defaults { 26 name: "com.android.conscrypt-defaults", 27 androidManifest: ":com.android.conscrypt-androidManifest", 28 compile_multilib: "both", 29 bootclasspath_fragments: ["com.android.conscrypt-bootclasspath-fragment"], 30 jni_libs: ["libjavacrypto"], 31 prebuilts: ["current_sdkinfo"], 32 multilib: { 33 both: { 34 binaries: ["boringssl_self_test"], 35 }, 36 }, 37 key: "apex.conscrypt.key", 38 certificate: ":com.android.conscrypt.certificate", 39 // Indicates that pre-installed version of this apex can be compressed. 40 // Whether it actually will be compressed is controlled on per-device basis. 41 compressible: true, 42 43 // IMPORTANT: q-launched-apex-module enables the build system to make 44 // sure the package compatible to Android 10 in two ways: 45 // - build the APEX package compatible to Android 10 46 // so that the package can be installed. 47 // - build artifacts (lib/javalib/bin) against Android 10 SDK 48 // so that the artifacts can run. 49 defaults: ["q-launched-apex-module"], 50} 51 52filegroup { 53 name: "com.android.conscrypt-androidManifest", 54 srcs: ["AndroidManifest.xml"], 55} 56 57apex_key { 58 name: "apex.conscrypt.key", 59 public_key: "com.android.conscrypt.avbpubkey", 60 private_key: "com.android.conscrypt.pem", 61} 62 63android_app_certificate { 64 name: "com.android.conscrypt.certificate", 65 certificate: "com.android.conscrypt", 66} 67 68prebuilt_etc { 69 name: "com.android.conscrypt.ld.config.txt", 70 src: "ld.config.txt", 71 filename: "ld.config.txt", 72 installable: false, 73} 74 75// Production APEX 76apex { 77 name: "com.android.conscrypt", 78 visibility: [ 79 "//vendor:__subpackages__", 80 ], 81 defaults: ["com.android.conscrypt-defaults"], 82 manifest: "apex_manifest.json", 83 binaries: ["boringssl_self_test"], 84 prebuilts: ["com.android.conscrypt.ld.config.txt"], 85} 86 87// Encapsulate the contributions made by the com.android.conscrypt to the bootclasspath. 88bootclasspath_fragment { 89 name: "com.android.conscrypt-bootclasspath-fragment", 90 contents: ["conscrypt"], 91 apex_available: ["com.android.conscrypt"], 92 // The bootclasspath_fragments that provide APIs on which this depends. 93 fragments: [ 94 { 95 apex: "com.android.art", 96 module: "art-bootclasspath-fragment", 97 }, 98 ], 99 // The APIs provided by this fragment. 100 api: { 101 stub_libs: [ 102 "conscrypt.module.public.api", 103 ], 104 }, 105 // The core platform APIs provided by this fragment. 106 core_platform_api: { 107 stub_libs: [ 108 "conscrypt.module.platform.api", 109 ], 110 }, 111 // Additional hidden API flags that override the default flags derived 112 // from the api stub libraries. 113 hidden_api: { 114 max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"], 115 116 // This module does not contain any split packages. 117 split_packages: [], 118 119 // The following packages and all their subpackages currently only 120 // contain classes from this bootclasspath_fragment. Listing a package 121 // here won't prevent other bootclasspath modules from adding classes in 122 // any of those packages but it will prevent them from adding those 123 // classes into an API surface, e.g. public, system, etc.. Doing so will 124 // result in a build failure due to inconsistent flags. 125 package_prefixes: [ 126 "android.net.ssl", 127 "com.android.org.conscrypt", 128 ], 129 }, 130} 131