1*795d594fSAndroid Build Coastguard Worker// Copyright (C) 2020 The Android Open Source Project 2*795d594fSAndroid Build Coastguard Worker// 3*795d594fSAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*795d594fSAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*795d594fSAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*795d594fSAndroid Build Coastguard Worker// 7*795d594fSAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*795d594fSAndroid Build Coastguard Worker// 9*795d594fSAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*795d594fSAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*795d594fSAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*795d594fSAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*795d594fSAndroid Build Coastguard Worker// limitations under the License. 14*795d594fSAndroid Build Coastguard Worker 15*795d594fSAndroid Build Coastguard Workerpackage { 16*795d594fSAndroid Build Coastguard Worker // See: http://go/android-license-faq 17*795d594fSAndroid Build Coastguard Worker // A large-scale-change added 'default_applicable_licenses' to import 18*795d594fSAndroid Build Coastguard Worker // all of the 'license_kinds' from "art_license" 19*795d594fSAndroid Build Coastguard Worker // to get the below license kinds: 20*795d594fSAndroid Build Coastguard Worker // SPDX-license-identifier-Apache-2.0 21*795d594fSAndroid Build Coastguard Worker default_applicable_licenses: ["art_license"], 22*795d594fSAndroid Build Coastguard Worker} 23*795d594fSAndroid Build Coastguard Worker 24*795d594fSAndroid Build Coastguard Worker// The SDK for the art module apex. 25*795d594fSAndroid Build Coastguard Workersdk { 26*795d594fSAndroid Build Coastguard Worker name: "art-module-sdk", 27*795d594fSAndroid Build Coastguard Worker host_supported: true, 28*795d594fSAndroid Build Coastguard Worker 29*795d594fSAndroid Build Coastguard Worker traits: { 30*795d594fSAndroid Build Coastguard Worker native_bridge_support: [ 31*795d594fSAndroid Build Coastguard Worker "jni_headers", 32*795d594fSAndroid Build Coastguard Worker ], 33*795d594fSAndroid Build Coastguard Worker ramdisk_image_required: [ 34*795d594fSAndroid Build Coastguard Worker "jni_headers", 35*795d594fSAndroid Build Coastguard Worker ], 36*795d594fSAndroid Build Coastguard Worker recovery_image_required: [ 37*795d594fSAndroid Build Coastguard Worker "jni_headers", 38*795d594fSAndroid Build Coastguard Worker ], 39*795d594fSAndroid Build Coastguard Worker }, 40*795d594fSAndroid Build Coastguard Worker 41*795d594fSAndroid Build Coastguard Worker target: { 42*795d594fSAndroid Build Coastguard Worker // Both android and host linux but not windows or darwin. 43*795d594fSAndroid Build Coastguard Worker linux: { 44*795d594fSAndroid Build Coastguard Worker native_header_libs: [ 45*795d594fSAndroid Build Coastguard Worker "jni_headers", 46*795d594fSAndroid Build Coastguard Worker "libartpalette-headers", 47*795d594fSAndroid Build Coastguard Worker "libnativehelper_header_only", 48*795d594fSAndroid Build Coastguard Worker "libopenjdkjvmti_headers", 49*795d594fSAndroid Build Coastguard Worker "odrefresh_headers", 50*795d594fSAndroid Build Coastguard Worker ], 51*795d594fSAndroid Build Coastguard Worker 52*795d594fSAndroid Build Coastguard Worker native_shared_libs: [ 53*795d594fSAndroid Build Coastguard Worker "libandroidio", 54*795d594fSAndroid Build Coastguard Worker "libnativebridge", 55*795d594fSAndroid Build Coastguard Worker "libnativehelper", 56*795d594fSAndroid Build Coastguard Worker "libnativeloader", 57*795d594fSAndroid Build Coastguard Worker "libsigchain", 58*795d594fSAndroid Build Coastguard Worker // The host variant of libdexfile is not present in >=V snapshots 59*795d594fSAndroid Build Coastguard Worker // via the workaround in https://r.android.com/3011798. 60*795d594fSAndroid Build Coastguard Worker "libdexfile", 61*795d594fSAndroid Build Coastguard Worker ], 62*795d594fSAndroid Build Coastguard Worker }, 63*795d594fSAndroid Build Coastguard Worker 64*795d594fSAndroid Build Coastguard Worker android: { 65*795d594fSAndroid Build Coastguard Worker apexes: [ 66*795d594fSAndroid Build Coastguard Worker // Adds exportable dependencies of the API to the sdk, 67*795d594fSAndroid Build Coastguard Worker // e.g. *classpath_fragments. 68*795d594fSAndroid Build Coastguard Worker "com.android.art", 69*795d594fSAndroid Build Coastguard Worker ], 70*795d594fSAndroid Build Coastguard Worker 71*795d594fSAndroid Build Coastguard Worker java_header_libs: [ 72*795d594fSAndroid Build Coastguard Worker // Needed by any module that builds against any non-numeric 73*795d594fSAndroid Build Coastguard Worker // sdk_version other than "none". 74*795d594fSAndroid Build Coastguard Worker // 75*795d594fSAndroid Build Coastguard Worker // This is actually only used for compiling Java 8 and kotlin. 76*795d594fSAndroid Build Coastguard Worker // Java 9 uses system modules which encapsulates this 77*795d594fSAndroid Build Coastguard Worker // internally. 78*795d594fSAndroid Build Coastguard Worker "core-lambda-stubs", 79*795d594fSAndroid Build Coastguard Worker 80*795d594fSAndroid Build Coastguard Worker // A special form or "core-lambda-stubs" for use in 81*795d594fSAndroid Build Coastguard Worker // java_system_modules. 82*795d594fSAndroid Build Coastguard Worker "core-lambda-stubs-for-system-modules", 83*795d594fSAndroid Build Coastguard Worker 84*795d594fSAndroid Build Coastguard Worker // Needed when javac compiles code containing @Generated 85*795d594fSAndroid Build Coastguard Worker // annotations produced by some code generation tools. 86*795d594fSAndroid Build Coastguard Worker "core-generated-annotation-stubs", 87*795d594fSAndroid Build Coastguard Worker ], 88*795d594fSAndroid Build Coastguard Worker 89*795d594fSAndroid Build Coastguard Worker java_sdk_libs: [ 90*795d594fSAndroid Build Coastguard Worker "art.module.public.api", 91*795d594fSAndroid Build Coastguard Worker ], 92*795d594fSAndroid Build Coastguard Worker 93*795d594fSAndroid Build Coastguard Worker java_system_modules: [ 94*795d594fSAndroid Build Coastguard Worker "art-module-public-api-stubs-system-modules", 95*795d594fSAndroid Build Coastguard Worker "art-module-lib-api-stubs-system-modules", 96*795d594fSAndroid Build Coastguard Worker "art-module-intra-core-api-stubs-system-modules", 97*795d594fSAndroid Build Coastguard Worker ], 98*795d594fSAndroid Build Coastguard Worker 99*795d594fSAndroid Build Coastguard Worker native_header_libs: [ 100*795d594fSAndroid Build Coastguard Worker "libnativeloader-headers", 101*795d594fSAndroid Build Coastguard Worker ], 102*795d594fSAndroid Build Coastguard Worker }, 103*795d594fSAndroid Build Coastguard Worker 104*795d594fSAndroid Build Coastguard Worker linux_bionic: { 105*795d594fSAndroid Build Coastguard Worker enabled: false, 106*795d594fSAndroid Build Coastguard Worker }, 107*795d594fSAndroid Build Coastguard Worker darwin: { 108*795d594fSAndroid Build Coastguard Worker enabled: false, 109*795d594fSAndroid Build Coastguard Worker }, 110*795d594fSAndroid Build Coastguard Worker }, 111*795d594fSAndroid Build Coastguard Worker} 112*795d594fSAndroid Build Coastguard Worker 113*795d594fSAndroid Build Coastguard Worker// Exported host tools and libraries. 114*795d594fSAndroid Build Coastguard Workermodule_exports { 115*795d594fSAndroid Build Coastguard Worker name: "art-module-host-exports", 116*795d594fSAndroid Build Coastguard Worker host_supported: true, 117*795d594fSAndroid Build Coastguard Worker 118*795d594fSAndroid Build Coastguard Worker target: { 119*795d594fSAndroid Build Coastguard Worker host: { 120*795d594fSAndroid Build Coastguard Worker // Set in target.host because the top level compile_multilib 121*795d594fSAndroid Build Coastguard Worker // property is fixed to "both" in the sdk/module_exports 122*795d594fSAndroid Build Coastguard Worker // implementation and cannot be overridden any other way. 123*795d594fSAndroid Build Coastguard Worker compile_multilib: "64", 124*795d594fSAndroid Build Coastguard Worker 125*795d594fSAndroid Build Coastguard Worker java_libs: [ 126*795d594fSAndroid Build Coastguard Worker "art.module.api.annotations", 127*795d594fSAndroid Build Coastguard Worker ], 128*795d594fSAndroid Build Coastguard Worker native_binaries: [ 129*795d594fSAndroid Build Coastguard Worker "dex2oat", 130*795d594fSAndroid Build Coastguard Worker "dex2oatd", 131*795d594fSAndroid Build Coastguard Worker "dexdump", 132*795d594fSAndroid Build Coastguard Worker "hiddenapi", 133*795d594fSAndroid Build Coastguard Worker "oatdump", 134*795d594fSAndroid Build Coastguard Worker "profman", 135*795d594fSAndroid Build Coastguard Worker "veridex", 136*795d594fSAndroid Build Coastguard Worker ], 137*795d594fSAndroid Build Coastguard Worker native_libs: [ 138*795d594fSAndroid Build Coastguard Worker // libdexfile dependencies for host tests. 139*795d594fSAndroid Build Coastguard Worker // These two libraries will be present in <=U snapshots. 140*795d594fSAndroid Build Coastguard Worker // These two libraries will be dropped in >=V snapshots 141*795d594fSAndroid Build Coastguard Worker // via the workaround in https://r.android.com/3011798. 142*795d594fSAndroid Build Coastguard Worker "libartpalette", 143*795d594fSAndroid Build Coastguard Worker "libartbase", 144*795d594fSAndroid Build Coastguard Worker ], 145*795d594fSAndroid Build Coastguard Worker }, 146*795d594fSAndroid Build Coastguard Worker 147*795d594fSAndroid Build Coastguard Worker linux_bionic: { 148*795d594fSAndroid Build Coastguard Worker enabled: false, 149*795d594fSAndroid Build Coastguard Worker }, 150*795d594fSAndroid Build Coastguard Worker darwin: { 151*795d594fSAndroid Build Coastguard Worker enabled: false, 152*795d594fSAndroid Build Coastguard Worker }, 153*795d594fSAndroid Build Coastguard Worker windows: { 154*795d594fSAndroid Build Coastguard Worker enabled: false, 155*795d594fSAndroid Build Coastguard Worker }, 156*795d594fSAndroid Build Coastguard Worker }, 157*795d594fSAndroid Build Coastguard Worker} 158*795d594fSAndroid Build Coastguard Worker 159*795d594fSAndroid Build Coastguard Worker// Exported tests and supporting libraries 160*795d594fSAndroid Build Coastguard Workermodule_exports { 161*795d594fSAndroid Build Coastguard Worker name: "art-module-test-exports", 162*795d594fSAndroid Build Coastguard Worker 163*795d594fSAndroid Build Coastguard Worker java_libs: [ 164*795d594fSAndroid Build Coastguard Worker "core-compat-test-rules", 165*795d594fSAndroid Build Coastguard Worker "core-test-rules", 166*795d594fSAndroid Build Coastguard Worker "core-tests-support", 167*795d594fSAndroid Build Coastguard Worker "okhttp-tests-nojarjar", 168*795d594fSAndroid Build Coastguard Worker 169*795d594fSAndroid Build Coastguard Worker // Needed for CtsJvmtiDeviceRunTestAppBase. 170*795d594fSAndroid Build Coastguard Worker "art_cts_jvmti_test_library", 171*795d594fSAndroid Build Coastguard Worker "expected_cts_outputs", 172*795d594fSAndroid Build Coastguard Worker 173*795d594fSAndroid Build Coastguard Worker // Needed for robolectric. 174*795d594fSAndroid Build Coastguard Worker "core-libart-for-host", 175*795d594fSAndroid Build Coastguard Worker "okhttp-for-host", 176*795d594fSAndroid Build Coastguard Worker 177*795d594fSAndroid Build Coastguard Worker // Needed for CtsLibcore...TestCases 178*795d594fSAndroid Build Coastguard Worker "libcore-expectations-knownfailures-jar", 179*795d594fSAndroid Build Coastguard Worker "libcore-expectations-virtualdeviceknownfailures-jar", 180*795d594fSAndroid Build Coastguard Worker 181*795d594fSAndroid Build Coastguard Worker // Needed for CtsLibcoreOkHttpTestCases 182*795d594fSAndroid Build Coastguard Worker "okhttp-nojarjar", 183*795d594fSAndroid Build Coastguard Worker ], 184*795d594fSAndroid Build Coastguard Worker 185*795d594fSAndroid Build Coastguard Worker java_tests: [ 186*795d594fSAndroid Build Coastguard Worker // Needed for CtsJdwpTestCases. 187*795d594fSAndroid Build Coastguard Worker "apache-harmony-jdwp-tests", 188*795d594fSAndroid Build Coastguard Worker 189*795d594fSAndroid Build Coastguard Worker "libcore-crypto-tests", 190*795d594fSAndroid Build Coastguard Worker 191*795d594fSAndroid Build Coastguard Worker // Needed for CtsLibcoreOjTestCases 192*795d594fSAndroid Build Coastguard Worker "core-ojtests-public", 193*795d594fSAndroid Build Coastguard Worker 194*795d594fSAndroid Build Coastguard Worker // Needed for CtsLibcoreJsr166TestCases 195*795d594fSAndroid Build Coastguard Worker "jsr166-tests", 196*795d594fSAndroid Build Coastguard Worker 197*795d594fSAndroid Build Coastguard Worker // Needed for CtsLibcoreTestCases 198*795d594fSAndroid Build Coastguard Worker "apache-harmony-tests", 199*795d594fSAndroid Build Coastguard Worker "core-tests", 200*795d594fSAndroid Build Coastguard Worker ], 201*795d594fSAndroid Build Coastguard Worker 202*795d594fSAndroid Build Coastguard Worker native_shared_libs: [ 203*795d594fSAndroid Build Coastguard Worker "libjavacoretests", 204*795d594fSAndroid Build Coastguard Worker ], 205*795d594fSAndroid Build Coastguard Worker} 206