1*cd0cc2e3SAndroid Build Coastguard Worker// Copyright (C) 2018 The Android Open Source Project 2*cd0cc2e3SAndroid Build Coastguard Worker// 3*cd0cc2e3SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*cd0cc2e3SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*cd0cc2e3SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*cd0cc2e3SAndroid Build Coastguard Worker// 7*cd0cc2e3SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*cd0cc2e3SAndroid Build Coastguard Worker// 9*cd0cc2e3SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*cd0cc2e3SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*cd0cc2e3SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*cd0cc2e3SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*cd0cc2e3SAndroid Build Coastguard Worker// limitations under the License. 14*cd0cc2e3SAndroid Build Coastguard Worker 15*cd0cc2e3SAndroid Build Coastguard Worker// Defaults shared between real and test versions of the APEX. 16*cd0cc2e3SAndroid Build Coastguard Workerpackage { 17*cd0cc2e3SAndroid Build Coastguard Worker // See: http://go/android-license-faq 18*cd0cc2e3SAndroid Build Coastguard Worker // A large-scale-change added 'default_applicable_licenses' to import 19*cd0cc2e3SAndroid Build Coastguard Worker // all of the 'license_kinds' from "external_conscrypt_license" 20*cd0cc2e3SAndroid Build Coastguard Worker // to get the below license kinds: 21*cd0cc2e3SAndroid Build Coastguard Worker // SPDX-license-identifier-Apache-2.0 22*cd0cc2e3SAndroid Build Coastguard Worker default_applicable_licenses: ["external_conscrypt_license"], 23*cd0cc2e3SAndroid Build Coastguard Worker} 24*cd0cc2e3SAndroid Build Coastguard Worker 25*cd0cc2e3SAndroid Build Coastguard Workerapex_defaults { 26*cd0cc2e3SAndroid Build Coastguard Worker name: "com.android.conscrypt-defaults", 27*cd0cc2e3SAndroid Build Coastguard Worker androidManifest: ":com.android.conscrypt-androidManifest", 28*cd0cc2e3SAndroid Build Coastguard Worker compile_multilib: "both", 29*cd0cc2e3SAndroid Build Coastguard Worker bootclasspath_fragments: ["com.android.conscrypt-bootclasspath-fragment"], 30*cd0cc2e3SAndroid Build Coastguard Worker jni_libs: ["libjavacrypto"], 31*cd0cc2e3SAndroid Build Coastguard Worker prebuilts: ["current_sdkinfo"], 32*cd0cc2e3SAndroid Build Coastguard Worker multilib: { 33*cd0cc2e3SAndroid Build Coastguard Worker both: { 34*cd0cc2e3SAndroid Build Coastguard Worker binaries: ["boringssl_self_test"], 35*cd0cc2e3SAndroid Build Coastguard Worker }, 36*cd0cc2e3SAndroid Build Coastguard Worker }, 37*cd0cc2e3SAndroid Build Coastguard Worker key: "apex.conscrypt.key", 38*cd0cc2e3SAndroid Build Coastguard Worker certificate: ":com.android.conscrypt.certificate", 39*cd0cc2e3SAndroid Build Coastguard Worker // Indicates that pre-installed version of this apex can be compressed. 40*cd0cc2e3SAndroid Build Coastguard Worker // Whether it actually will be compressed is controlled on per-device basis. 41*cd0cc2e3SAndroid Build Coastguard Worker compressible: true, 42*cd0cc2e3SAndroid Build Coastguard Worker 43*cd0cc2e3SAndroid Build Coastguard Worker // IMPORTANT: q-launched-dcla-enabled-apex-module enables the build system to make 44*cd0cc2e3SAndroid Build Coastguard Worker // sure the package compatible to Android 10 in two ways: 45*cd0cc2e3SAndroid Build Coastguard Worker // - build the APEX package compatible to Android 10 46*cd0cc2e3SAndroid Build Coastguard Worker // so that the package can be installed. 47*cd0cc2e3SAndroid Build Coastguard Worker // - build artifacts (lib/javalib/bin) against Android 10 SDK 48*cd0cc2e3SAndroid Build Coastguard Worker // so that the artifacts can run. 49*cd0cc2e3SAndroid Build Coastguard Worker defaults: ["q-launched-dcla-enabled-apex-module"], 50*cd0cc2e3SAndroid Build Coastguard Worker} 51*cd0cc2e3SAndroid Build Coastguard Worker 52*cd0cc2e3SAndroid Build Coastguard Workerfilegroup { 53*cd0cc2e3SAndroid Build Coastguard Worker name: "com.android.conscrypt-androidManifest", 54*cd0cc2e3SAndroid Build Coastguard Worker srcs: ["AndroidManifest.xml"], 55*cd0cc2e3SAndroid Build Coastguard Worker} 56*cd0cc2e3SAndroid Build Coastguard Worker 57*cd0cc2e3SAndroid Build Coastguard Workerapex_key { 58*cd0cc2e3SAndroid Build Coastguard Worker name: "apex.conscrypt.key", 59*cd0cc2e3SAndroid Build Coastguard Worker public_key: "com.android.conscrypt.avbpubkey", 60*cd0cc2e3SAndroid Build Coastguard Worker private_key: "com.android.conscrypt.pem", 61*cd0cc2e3SAndroid Build Coastguard Worker} 62*cd0cc2e3SAndroid Build Coastguard Worker 63*cd0cc2e3SAndroid Build Coastguard Workerandroid_app_certificate { 64*cd0cc2e3SAndroid Build Coastguard Worker name: "com.android.conscrypt.certificate", 65*cd0cc2e3SAndroid Build Coastguard Worker certificate: "com.android.conscrypt", 66*cd0cc2e3SAndroid Build Coastguard Worker} 67*cd0cc2e3SAndroid Build Coastguard Worker 68*cd0cc2e3SAndroid Build Coastguard Workerprebuilt_etc { 69*cd0cc2e3SAndroid Build Coastguard Worker name: "com.android.conscrypt.ld.config.txt", 70*cd0cc2e3SAndroid Build Coastguard Worker src: "ld.config.txt", 71*cd0cc2e3SAndroid Build Coastguard Worker filename: "ld.config.txt", 72*cd0cc2e3SAndroid Build Coastguard Worker installable: false, 73*cd0cc2e3SAndroid Build Coastguard Worker} 74*cd0cc2e3SAndroid Build Coastguard Worker 75*cd0cc2e3SAndroid Build Coastguard Worker// Production APEX 76*cd0cc2e3SAndroid Build Coastguard Workerapex { 77*cd0cc2e3SAndroid Build Coastguard Worker name: "com.android.conscrypt", 78*cd0cc2e3SAndroid Build Coastguard Worker visibility: [ 79*cd0cc2e3SAndroid Build Coastguard Worker "//external/conscrypt", 80*cd0cc2e3SAndroid Build Coastguard Worker "//vendor:__subpackages__", 81*cd0cc2e3SAndroid Build Coastguard Worker "//packages/modules/common/build", 82*cd0cc2e3SAndroid Build Coastguard Worker ], 83*cd0cc2e3SAndroid Build Coastguard Worker defaults: ["com.android.conscrypt-defaults"], 84*cd0cc2e3SAndroid Build Coastguard Worker manifest: "apex_manifest.json", 85*cd0cc2e3SAndroid Build Coastguard Worker binaries: ["boringssl_self_test"], 86*cd0cc2e3SAndroid Build Coastguard Worker prebuilts: [ 87*cd0cc2e3SAndroid Build Coastguard Worker "com.android.conscrypt.ld.config.txt", 88*cd0cc2e3SAndroid Build Coastguard Worker "cacerts_apex", 89*cd0cc2e3SAndroid Build Coastguard Worker ], 90*cd0cc2e3SAndroid Build Coastguard Worker min_sdk_version: "30", 91*cd0cc2e3SAndroid Build Coastguard Worker} 92*cd0cc2e3SAndroid Build Coastguard Worker 93*cd0cc2e3SAndroid Build Coastguard Worker// Encapsulate the contributions made by the com.android.conscrypt to the bootclasspath. 94*cd0cc2e3SAndroid Build Coastguard Workerbootclasspath_fragment { 95*cd0cc2e3SAndroid Build Coastguard Worker name: "com.android.conscrypt-bootclasspath-fragment", 96*cd0cc2e3SAndroid Build Coastguard Worker contents: ["conscrypt"], 97*cd0cc2e3SAndroid Build Coastguard Worker apex_available: ["com.android.conscrypt"], 98*cd0cc2e3SAndroid Build Coastguard Worker // The bootclasspath_fragments that provide APIs on which this depends. 99*cd0cc2e3SAndroid Build Coastguard Worker fragments: [ 100*cd0cc2e3SAndroid Build Coastguard Worker { 101*cd0cc2e3SAndroid Build Coastguard Worker apex: "com.android.art", 102*cd0cc2e3SAndroid Build Coastguard Worker module: "art-bootclasspath-fragment", 103*cd0cc2e3SAndroid Build Coastguard Worker }, 104*cd0cc2e3SAndroid Build Coastguard Worker ], 105*cd0cc2e3SAndroid Build Coastguard Worker // The APIs provided by this fragment. 106*cd0cc2e3SAndroid Build Coastguard Worker api: { 107*cd0cc2e3SAndroid Build Coastguard Worker stub_libs: [ 108*cd0cc2e3SAndroid Build Coastguard Worker "conscrypt.module.public.api", 109*cd0cc2e3SAndroid Build Coastguard Worker ], 110*cd0cc2e3SAndroid Build Coastguard Worker }, 111*cd0cc2e3SAndroid Build Coastguard Worker // The core platform APIs provided by this fragment. 112*cd0cc2e3SAndroid Build Coastguard Worker core_platform_api: { 113*cd0cc2e3SAndroid Build Coastguard Worker stub_libs: [ 114*cd0cc2e3SAndroid Build Coastguard Worker "conscrypt.module.platform.api", 115*cd0cc2e3SAndroid Build Coastguard Worker ], 116*cd0cc2e3SAndroid Build Coastguard Worker }, 117*cd0cc2e3SAndroid Build Coastguard Worker // Additional hidden API flags that override the default flags derived 118*cd0cc2e3SAndroid Build Coastguard Worker // from the api stub libraries. 119*cd0cc2e3SAndroid Build Coastguard Worker hidden_api: { 120*cd0cc2e3SAndroid Build Coastguard Worker max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"], 121*cd0cc2e3SAndroid Build Coastguard Worker 122*cd0cc2e3SAndroid Build Coastguard Worker // This module does not contain any split packages. 123*cd0cc2e3SAndroid Build Coastguard Worker split_packages: [], 124*cd0cc2e3SAndroid Build Coastguard Worker 125*cd0cc2e3SAndroid Build Coastguard Worker // The following packages and all their subpackages currently only 126*cd0cc2e3SAndroid Build Coastguard Worker // contain classes from this bootclasspath_fragment. Listing a package 127*cd0cc2e3SAndroid Build Coastguard Worker // here won't prevent other bootclasspath modules from adding classes in 128*cd0cc2e3SAndroid Build Coastguard Worker // any of those packages but it will prevent them from adding those 129*cd0cc2e3SAndroid Build Coastguard Worker // classes into an API surface, e.g. public, system, etc.. Doing so will 130*cd0cc2e3SAndroid Build Coastguard Worker // result in a build failure due to inconsistent flags. 131*cd0cc2e3SAndroid Build Coastguard Worker package_prefixes: [ 132*cd0cc2e3SAndroid Build Coastguard Worker "android.net.ssl", 133*cd0cc2e3SAndroid Build Coastguard Worker "com.android.org.conscrypt", 134*cd0cc2e3SAndroid Build Coastguard Worker ], 135*cd0cc2e3SAndroid Build Coastguard Worker }, 136*cd0cc2e3SAndroid Build Coastguard Worker} 137