1// Copyright (C) 2021 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 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "art_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["art_license"], 22} 23 24java_defaults { 25 name: "art-bootclasspath-fragment-soong-config-defaults", 26 core_platform_api: { 27 // TODO: b/319697968 - Remove the conditional logic and let art-bootclasspath-fragment 28 // always depend on the exportable stubs once metalava fully supports flagged api handling. 29 stub_libs: select(release_flag("RELEASE_HIDDEN_API_EXPORTABLE_STUBS"), { 30 // When "RELEASE_HIDDEN_API_EXPORTABLE_STUBS" build flag is set, 31 // depend on the exportable stubs, otherwise depend on the everything stubs. 32 // In both cases, use core platform (aka. module_lib) stubs for all the non-coverage 33 // contents. 34 true: ["art.module.public.api.stubs.exportable.module_lib"], 35 false: ["art.module.public.api.stubs.module_lib"], 36 }), 37 }, 38} 39 40// Encapsulate the contributions made by the com.android.art to the bootclasspath. 41bootclasspath_fragment { 42 name: "art-bootclasspath-fragment", 43 defaults: [ 44 "art-bootclasspath-fragment-soong-config-defaults", 45 ], 46 image_name: "art", 47 // Must match the ART_APEX_JARS set in build/make/core/envsetup.mk 48 contents: [ 49 "core-oj", 50 "core-libart", 51 "okhttp", 52 "bouncycastle", 53 "apache-xml", 54 ], 55 56 api: { 57 stub_libs: [ 58 // Stubs for the core-oj and core-libart. The other modules do not 59 // have any public API. 60 "art.module.public.api", 61 ], 62 }, 63 64 // Additional properties to append when coverage is enabled, i.e. when 65 // EMMA_INSTRUMENT_FRAMEWORK=true 66 coverage: { 67 contents: [ 68 "jacocoagent", 69 ], 70 api: { 71 stub_libs: [ 72 // Stubs for the jacocoagent. 73 "jacoco-stubs", 74 ], 75 }, 76 77 hidden_api: { 78 // Additional packages provided by jacoagent 79 package_prefixes: [ 80 "com.vladium.emma.rt", 81 "org.jacoco", 82 "org.objectweb.asm", 83 ], 84 85 }, 86 }, 87 visibility: [ 88 "//art/build/apex", 89 "//art/build/sdk", 90 ], 91 apex_available: [ 92 "com.android.art", 93 "com.android.art.debug", 94 ], 95 96 hidden_api: { 97 blocked: ["hiddenapi/hiddenapi-blocked.txt"], 98 max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"], 99 unsupported_packages: ["hiddenapi/hiddenapi-unsupported-packages.txt"], 100 101 // This module does not contain any split packages. 102 split_packages: [], 103 104 // The following packages currently only contain classes from this 105 // bootclasspath_fragment but some of their sub-packages contain classes 106 // from other bootckasspath modules. Packages should only be listed here 107 // when necessary for legacy purposes, new packages should match a 108 // package prefix. 109 single_packages: [ 110 "android.system", 111 ], 112 113 // The following packages and all their subpackages currently only 114 // contain classes from this bootclasspath_fragment. Listing a package 115 // here won't prevent other bootclasspath modules from adding classes in 116 // any of those packages but it will prevent them from adding those 117 // classes into an API surface, e.g. public, system, etc.. Doing so will 118 // result in a build failure due to inconsistent flags. 119 package_prefixes: [ 120 "android.compat", 121 "android.crypto.hpke", 122 "com.android.art.flags", 123 "com.android.libcore", 124 "com.android.okhttp", 125 "com.android.org.bouncycastle", 126 "com.android.org.kxml2", 127 "com.sun", 128 "dalvik", 129 "java", 130 "javax.annotation", 131 "javax.crypto", 132 "javax.net", 133 "javax.security", 134 "javax.sql", 135 "javax.xml", 136 "jdk", 137 "libcore", 138 "org.apache.harmony", 139 "org.apache.xalan", 140 "org.apache.xml", 141 "org.apache.xpath", 142 "org.json", 143 "org.w3c", 144 "org.xml", 145 "org.xmlpull", 146 "sun", 147 ], 148 }, 149} 150 151// Encapsulate the contributions made by the com.android.art to the systemserverclasspath. 152systemserverclasspath_fragment { 153 name: "art-systemserverclasspath-fragment", 154 contents: ["service-art"], 155 apex_available: [ 156 "com.android.art", 157 "com.android.art.debug", 158 ], 159} 160