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