blob: 18c851ee992708f418dd0d89b5656f7e395e2a17 [file] [log] [blame]
Chris Wailesbefdad42021-01-12 16:37:57 -08001// 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 Badour9150de62021-02-26 03:22:24 -080015package {
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 Wailesbefdad42021-01-12 16:37:57 -080024cc_library {
25 // This native library contains JNI support code for the ART Service Java
26 // Language library.
27
28 name: "libartservice",
Martin Stjernholm22a61622021-03-17 13:30:25 +000029 defaults: ["art_defaults"],
Chris Wailesbefdad42021-01-12 16:37:57 -080030 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 Wailesbefdad42021-01-12 16:37:57 -080043}
44
Paul Duffincda3d472021-02-10 11:37:43 +000045// Provides the API and implementation of the ART Service class that will be
46// loaded by the System Server.
47java_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 Wailesa3939882021-05-05 18:06:49 -070051 defaults: ["framework-system-server-module-defaults"],
52
Paul Duffincda3d472021-02-10 11:37:43 +000053 permitted_packages: ["com.android.server.art"],
54
Chris Wailesbefdad42021-01-12 16:37:57 -080055 visibility: [
56 "//art:__subpackages__",
Paul Duffincda3d472021-02-10 11:37:43 +000057 "//frameworks/base/services/core",
Chris Wailesbefdad42021-01-12 16:37:57 -080058 ],
59
Paul Duffincda3d472021-02-10 11:37:43 +000060 impl_library_visibility: [
Paul Duffincda3d472021-02-10 11:37:43 +000061 "//art/libartservice/tests",
Paul Duffincda3d472021-02-10 11:37:43 +000062 ],
63
64 stubs_library_visibility: ["//visibility:public"],
65 stubs_source_visibility: ["//visibility:private"],
66
Chris Wailesbefdad42021-01-12 16:37:57 -080067 apex_available: [
68 "com.android.art",
69 "com.android.art.debug",
70 ],
Chris Wailesbefdad42021-01-12 16:37:57 -080071 sdk_version: "core_platform",
Nicolas Geoffrayec388c02021-03-03 22:09:06 +000072 min_sdk_version: "31",
Chris Wailesbefdad42021-01-12 16:37:57 -080073
Paul Duffincda3d472021-02-10 11:37:43 +000074 // The API elements are the ones annotated with
75 // libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE)
76 droiddoc_options: [
Paul Duffincda3d472021-02-10 11:37:43 +000077 "--show-single-annotation libcore.api.CorePlatformApi\\(status=libcore.api.CorePlatformApi.Status.STABLE\\)",
78 ],
79
80 // Temporarily disable compatibility with previous released APIs.
81 // TODO - remove once prototype has stabilized
82 // running "m update-api" will give instructions on what to do next
83 unsafe_ignore_missing_latest_api: true,
84
satayeva40f5cd2021-05-20 20:24:35 +010085 // This cannot be accessed by apps using <uses-library> in their manifest.
86 shared_library: false,
87 // TODO(b/188773212): force dex compilation for inclusion in bootclasspath_fragment.
88 compile_dex: true,
89
Chris Wailesbefdad42021-01-12 16:37:57 -080090 srcs: [
Paul Duffincda3d472021-02-10 11:37:43 +000091 "service/java/com/android/server/art/ArtManagerLocal.java",
Chris Wailesbefdad42021-01-12 16:37:57 -080092 ],
93
94 libs: [
95 "art.module.api.annotations.for.system.modules",
Chris Wailesbefdad42021-01-12 16:37:57 -080096 ],
97
98 plugins: ["java_api_finder"],
Colin Cross5ffa3552021-05-10 10:47:15 -070099 dist_group: "android",
Chris Wailesbefdad42021-01-12 16:37:57 -0800100}
Chris Wailesbfd622a2021-01-13 16:13:41 -0800101
Roland Levillainf0409142021-03-22 15:45:03 +0000102art_cc_defaults {
103 name: "art_libartservice_tests_defaults",
Chris Wailesbfd622a2021-01-13 16:13:41 -0800104 srcs: [
105 "service/native/service_test.cc",
106 ],
107 shared_libs: [
108 "libbase",
109 "libartservice",
110 ],
111}
Roland Levillainf0409142021-03-22 15:45:03 +0000112
113// Version of ART gtest `art_libartservice_tests` bundled with the ART APEX on target.
114// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete.
115art_cc_test {
116 name: "art_libartservice_tests",
117 defaults: [
118 "art_gtest_defaults",
119 "art_libartservice_tests_defaults",
120 ],
121}
122
123// Standalone version of ART gtest `art_libartservice_tests`, not bundled with the ART APEX on
124// target.
125art_cc_test {
126 name: "art_standalone_libartservice_tests",
127 defaults: [
128 "art_standalone_gtest_defaults",
129 "art_libartservice_tests_defaults",
130 ],
131}