Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 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 | |
Bob Badour | 9150de6 | 2021-02-26 03:22:24 -0800 | [diff] [blame] | 15 | package { |
| 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 | |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 24 | cc_library { |
| 25 | // This native library contains JNI support code for the ART Service Java |
| 26 | // Language library. |
| 27 | |
| 28 | name: "libartservice", |
Martin Stjernholm | 22a6162 | 2021-03-17 13:30:25 +0000 | [diff] [blame] | 29 | defaults: ["art_defaults"], |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 30 | host_supported: true, |
| 31 | srcs: [ |
| 32 | "service/native/service.cc", |
| 33 | ], |
| 34 | export_include_dirs: ["."], |
| 35 | apex_available: [ |
| 36 | "com.android.art", |
| 37 | "com.android.art.debug", |
| 38 | ], |
| 39 | shared_libs: [ |
| 40 | "libbase", |
| 41 | ], |
| 42 | export_shared_lib_headers: ["libbase"], |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 43 | } |
| 44 | |
Paul Duffin | cda3d47 | 2021-02-10 11:37:43 +0000 | [diff] [blame] | 45 | // Provides the API and implementation of the ART Service class that will be |
| 46 | // loaded by the System Server. |
| 47 | java_sdk_library { |
| 48 | // This target is named 'service-art' to conform to the naming conventions |
| 49 | // for JAR files in the System Server. |
| 50 | name: "service-art", |
Chris Wailes | a393988 | 2021-05-05 18:06:49 -0700 | [diff] [blame] | 51 | defaults: ["framework-system-server-module-defaults"], |
| 52 | |
Paul Duffin | cda3d47 | 2021-02-10 11:37:43 +0000 | [diff] [blame] | 53 | permitted_packages: ["com.android.server.art"], |
| 54 | |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 55 | visibility: [ |
| 56 | "//art:__subpackages__", |
Paul Duffin | cda3d47 | 2021-02-10 11:37:43 +0000 | [diff] [blame] | 57 | "//frameworks/base/services/core", |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 58 | ], |
| 59 | |
Paul Duffin | cda3d47 | 2021-02-10 11:37:43 +0000 | [diff] [blame] | 60 | impl_library_visibility: [ |
Paul Duffin | cda3d47 | 2021-02-10 11:37:43 +0000 | [diff] [blame] | 61 | "//art/libartservice/tests", |
Paul Duffin | cda3d47 | 2021-02-10 11:37:43 +0000 | [diff] [blame] | 62 | ], |
| 63 | |
| 64 | stubs_library_visibility: ["//visibility:public"], |
| 65 | stubs_source_visibility: ["//visibility:private"], |
| 66 | |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 67 | apex_available: [ |
| 68 | "com.android.art", |
| 69 | "com.android.art.debug", |
| 70 | ], |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 71 | sdk_version: "core_platform", |
Nicolas Geoffray | ec388c0 | 2021-03-03 22:09:06 +0000 | [diff] [blame] | 72 | min_sdk_version: "31", |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 73 | |
Paul Duffin | eacf044 | 2021-07-08 11:33:10 +0100 | [diff] [blame^] | 74 | public: { |
| 75 | // Override the setting of "module_current" from the defaults as that is |
| 76 | // not available in all manifests where this needs to be built. |
| 77 | sdk_version: "core_current", |
| 78 | }, |
| 79 | |
| 80 | system_server: { |
| 81 | // Override the setting of "module_current" from the defaults as that is |
| 82 | // not available in all manifests where this needs to be built. |
| 83 | sdk_version: "core_current", |
| 84 | }, |
| 85 | |
Paul Duffin | cda3d47 | 2021-02-10 11:37:43 +0000 | [diff] [blame] | 86 | // The API elements are the ones annotated with |
| 87 | // libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) |
| 88 | droiddoc_options: [ |
Paul Duffin | cda3d47 | 2021-02-10 11:37:43 +0000 | [diff] [blame] | 89 | "--show-single-annotation libcore.api.CorePlatformApi\\(status=libcore.api.CorePlatformApi.Status.STABLE\\)", |
| 90 | ], |
| 91 | |
| 92 | // Temporarily disable compatibility with previous released APIs. |
| 93 | // TODO - remove once prototype has stabilized |
| 94 | // running "m update-api" will give instructions on what to do next |
| 95 | unsafe_ignore_missing_latest_api: true, |
| 96 | |
satayev | a40f5cd | 2021-05-20 20:24:35 +0100 | [diff] [blame] | 97 | // This cannot be accessed by apps using <uses-library> in their manifest. |
| 98 | shared_library: false, |
| 99 | // TODO(b/188773212): force dex compilation for inclusion in bootclasspath_fragment. |
| 100 | compile_dex: true, |
| 101 | |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 102 | srcs: [ |
Paul Duffin | cda3d47 | 2021-02-10 11:37:43 +0000 | [diff] [blame] | 103 | "service/java/com/android/server/art/ArtManagerLocal.java", |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 104 | ], |
| 105 | |
| 106 | libs: [ |
| 107 | "art.module.api.annotations.for.system.modules", |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 108 | ], |
| 109 | |
| 110 | plugins: ["java_api_finder"], |
Colin Cross | 5ffa355 | 2021-05-10 10:47:15 -0700 | [diff] [blame] | 111 | dist_group: "android", |
Chris Wailes | befdad4 | 2021-01-12 16:37:57 -0800 | [diff] [blame] | 112 | } |
Chris Wailes | bfd622a | 2021-01-13 16:13:41 -0800 | [diff] [blame] | 113 | |
Roland Levillain | f040914 | 2021-03-22 15:45:03 +0000 | [diff] [blame] | 114 | art_cc_defaults { |
| 115 | name: "art_libartservice_tests_defaults", |
Chris Wailes | bfd622a | 2021-01-13 16:13:41 -0800 | [diff] [blame] | 116 | srcs: [ |
| 117 | "service/native/service_test.cc", |
| 118 | ], |
| 119 | shared_libs: [ |
| 120 | "libbase", |
| 121 | "libartservice", |
| 122 | ], |
| 123 | } |
Roland Levillain | f040914 | 2021-03-22 15:45:03 +0000 | [diff] [blame] | 124 | |
| 125 | // Version of ART gtest `art_libartservice_tests` bundled with the ART APEX on target. |
| 126 | // TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete. |
| 127 | art_cc_test { |
| 128 | name: "art_libartservice_tests", |
| 129 | defaults: [ |
| 130 | "art_gtest_defaults", |
| 131 | "art_libartservice_tests_defaults", |
| 132 | ], |
| 133 | } |
| 134 | |
| 135 | // Standalone version of ART gtest `art_libartservice_tests`, not bundled with the ART APEX on |
| 136 | // target. |
| 137 | art_cc_test { |
| 138 | name: "art_standalone_libartservice_tests", |
| 139 | defaults: [ |
| 140 | "art_standalone_gtest_defaults", |
| 141 | "art_libartservice_tests_defaults", |
| 142 | ], |
| 143 | } |