xref: /aosp_15_r20/tools/platform-compat/java/android/compat/annotation/Android.bp (revision b7bfe76a3376ed14ad4000514e7f5aa4f0ee949d)
1/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21java_library {
22    name: "app-compat-annotations",
23    host_supported: true,
24    srcs: [
25        "ChangeId.java",
26        "Disabled.java",
27        "EnabledAfter.java",
28        "EnabledSince.java",
29        "LoggingOnly.java",
30        "Overridable.java",
31    ],
32    sdk_version: "core_current",
33    exported_plugins: ["compat-changeid-annotation-processor"],
34}
35
36// Don't forget to depend on exported_plugins, if using sources directly
37filegroup {
38    name: "app-compat-annotations-source",
39    srcs: [
40        "ChangeId.java",
41        "Disabled.java",
42        "EnabledAfter.java",
43        "EnabledSince.java",
44        "LoggingOnly.java",
45        "Overridable.java",
46        "UnsupportedAppUsage.java",
47    ],
48    visibility: [
49        "//libcore:__pkg__",
50        "//external/icu/android_icu4j:__pkg__",
51    ],
52}
53
54java_library {
55    name: "unsupportedappusage",
56    host_supported: true,
57    srcs: [
58        "UnsupportedAppUsage.java",
59    ],
60    sdk_version: "core_current",
61    exported_plugins: ["unsupportedappusage-annotation-processor"],
62}
63
64// Identical to unsupportedappusage, but sdk_version is none.
65// Used for core modules where setting sdk_version of the dependencies as
66// core_current leads to circular dependencies
67java_library {
68    name: "unsupportedappusage-sdk-none",
69    host_supported: true,
70    srcs: [
71        "UnsupportedAppUsage.java",
72    ],
73    sdk_version: "none",
74    system_modules: "core-all-system-modules",
75    exported_plugins: ["unsupportedappusage-annotation-processor"],
76    patch_module: "java.base",
77}
78