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. 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 24// Additional visibility to add to the prebuilt modules that are part of 25// the snapshots of the ART sdk/module_exports to ensure that they are 26// visible to each other. 27prebuilt_visibility = [ 28 // TODO(b/155921753): Restrict this when prebuilts are in their proper 29 // locations. 30 "//prebuilts:__subpackages__", 31] 32 33// The SDK for the art module apex. 34sdk { 35 name: "art-module-sdk", 36 host_supported: true, 37 38 prebuilt_visibility: prebuilt_visibility, 39 40 traits: { 41 native_bridge_support: [ 42 "jni_headers", 43 ], 44 ramdisk_image_required: [ 45 "jni_headers", 46 ], 47 recovery_image_required: [ 48 "jni_headers", 49 ], 50 }, 51 52 target: { 53 // Both android and host linux but not windows or darwin. 54 linux: { 55 native_header_libs: [ 56 "jni_headers", 57 "libartpalette-headers", 58 "libnativehelper_header_only", 59 "libopenjdkjvmti_headers", 60 "odrefresh_headers", 61 ], 62 63 native_shared_libs: [ 64 "libandroidio", 65 "libnativebridge", 66 "libnativehelper", 67 "libnativeloader", 68 "libsigchain", 69 // The host variant of libdexfile is not present in >=V snapshots 70 // via the workaround in https://r.android.com/3011798. 71 "libdexfile", 72 ], 73 74 native_static_libs: [ 75 "libdexfile_support", 76 "libdexfile_static", 77 "libnativehelper_lazy", 78 ], 79 }, 80 81 android: { 82 apexes: [ 83 // Adds exportable dependencies of the API to the sdk, 84 // e.g. *classpath_fragments. 85 "com.android.art", 86 ], 87 88 java_header_libs: [ 89 // Needed by any module that builds against any non-numeric 90 // sdk_version other than "none". 91 // 92 // This is actually only used for compiling Java 8 and kotlin. 93 // Java 9 uses system modules which encapsulates this 94 // internally. 95 "core-lambda-stubs", 96 97 // A special form or "core-lambda-stubs" for use in 98 // java_system_modules. 99 "core-lambda-stubs-for-system-modules", 100 101 // Needed when javac compiles code containing @Generated 102 // annotations produced by some code generation tools. 103 "core-generated-annotation-stubs", 104 ], 105 106 java_sdk_libs: [ 107 "art.module.public.api", 108 ], 109 110 java_system_modules: [ 111 "art-module-public-api-stubs-system-modules", 112 "art-module-lib-api-stubs-system-modules", 113 "art-module-intra-core-api-stubs-system-modules", 114 ], 115 native_header_libs: [ 116 "libnativeloader-headers", 117 ], 118 native_shared_libs: [ 119 "libnativebridge_lazy", 120 "libnativehelper_compat_libc++", 121 "libnativeloader_lazy", 122 ], 123 }, 124 125 linux_bionic: { 126 enabled: false, 127 }, 128 darwin: { 129 enabled: false, 130 }, 131 }, 132} 133 134// Exported host tools and libraries. 135module_exports { 136 name: "art-module-host-exports", 137 host_supported: true, 138 139 prebuilt_visibility: prebuilt_visibility, 140 141 target: { 142 host: { 143 // Set in target.host because the top level compile_multilib 144 // property is fixed to "both" in the sdk/module_exports 145 // implementation and cannot be overridden any other way. 146 compile_multilib: "64", 147 148 java_libs: [ 149 "art.module.api.annotations", 150 ], 151 native_binaries: [ 152 "dex2oat", 153 "dex2oatd", 154 "dexdump", 155 "hiddenapi", 156 "oatdump", 157 "profman", 158 "veridex", 159 ], 160 native_libs: [ 161 // libdexfile dependencies for host tests. 162 // These two libraries will be present in <=U snapshots. 163 // These two libraries will be dropped in >=V snapshots 164 // via the workaround in https://r.android.com/3011798. 165 "libartpalette", 166 "libartbase", 167 ], 168 }, 169 170 linux_bionic: { 171 enabled: false, 172 }, 173 darwin: { 174 enabled: false, 175 }, 176 windows: { 177 enabled: false, 178 }, 179 }, 180} 181 182// Exported tests and supporting libraries 183module_exports { 184 name: "art-module-test-exports", 185 186 prebuilt_visibility: prebuilt_visibility, 187 188 java_libs: [ 189 "core-compat-test-rules", 190 "core-test-rules", 191 "core-tests-support", 192 "okhttp-tests-nojarjar", 193 194 // Needed for CtsJvmtiDeviceRunTestAppBase. 195 "art_cts_jvmti_test_library", 196 "expected_cts_outputs", 197 198 // Needed for robolectric. 199 "core-libart-for-host", 200 "okhttp-for-host", 201 202 // Needed for CtsLibcore...TestCases 203 "libcore-expectations-knownfailures-jar", 204 "libcore-expectations-virtualdeviceknownfailures-jar", 205 206 // Needed for CtsLibcoreOkHttpTestCases 207 "okhttp-nojarjar", 208 ], 209 210 java_tests: [ 211 // Needed for CtsJdwpTestCases. 212 "apache-harmony-jdwp-tests", 213 214 "libcore-crypto-tests", 215 216 // Needed for CtsLibcoreOjTestCases 217 "core-ojtests-public", 218 219 // Needed for CtsLibcoreJsr166TestCases 220 "jsr166-tests", 221 222 // Needed for CtsLibcoreTestCases 223 "apache-harmony-tests", 224 "core-tests", 225 ], 226 227 native_shared_libs: [ 228 "libjavacoretests", 229 ], 230 native_static_libs: [ 231 // TODO(b/187288515): Providing this as a prebuilt introduces an issue 232 // with sdk_version propagation. Temporarily use the source library 233 // instead. 234 //"libctstiagent", 235 ], 236} 237