xref: /aosp_15_r20/prebuilts/sdk/Android.bp (revision 344a7f5ef16c479e7a7f54ee6567a9d112f9e72b)
1// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS.  PLEASE
2//     CONSULT THE OWNERS AND [email protected] BEFORE
3//     DEPENDING ON IT IN YOUR PROJECT. ***
4package {
5    default_applicable_licenses: ["prebuilts_sdk_license"],
6}
7
8// Added automatically by a large-scale-change that took the approach of
9// 'apply every license found to every target'. While this makes sure we respect
10// every license restriction, it may not be entirely correct.
11//
12// e.g. GPL in an MIT project might only apply to the contrib/ directory.
13//
14// Please consider splitting the single license below into multiple licenses,
15// taking care not to lose any license_kind information, and overriding the
16// default license using the 'licenses: [...]' property on targets as needed.
17//
18// For unused files, consider creating a 'fileGroup' with "//visibility:private"
19// to attach the license to, and including a comment whether the files may be
20// used in the current project.
21// See: http://go/android-license-faq
22license {
23    name: "prebuilts_sdk_license",
24    visibility: [":__subpackages__"],
25    license_kinds: [
26        "SPDX-license-identifier-Apache-2.0",
27        "SPDX-license-identifier-BSD",
28        "SPDX-license-identifier-CC0-1.0",
29        "SPDX-license-identifier-CPL-1.0",
30        "SPDX-license-identifier-MIT",
31        "SPDX-license-identifier-NCSA",
32        "SPDX-license-identifier-OFL", // by exception only
33        "SPDX-license-identifier-Unicode-DFS",
34        "SPDX-license-identifier-W3C",
35        "legacy_unencumbered",
36    ],
37    license_text: [
38        "NOTICE",
39    ],
40}
41
42subdirs = ["tools"]
43
44filegroup {
45    name: "current-support-api",
46    srcs: [
47        "current/support-api.txt",
48    ],
49}
50
51genrule {
52    name: "current-androidx-api",
53    srcs: ["current/androidx-api.txt"],
54    out: ["androidx-api.xml"],
55    tools: ["metalava"],
56    cmd: "$(location metalava) signature-to-jdiff $(in) $(out)",
57}
58
59filegroup {
60    name: "metalava-sdk-android-jars",
61    srcs: [
62        "**/android.jar",
63    ],
64}
65
66droiddoc_exported_dir {
67    name: "sdk-dir",
68    path: ".",
69}
70
71genrule {
72    name: "last-released-public-api-for-metalava-annotations",
73    srcs: [
74        "*/public/api/android.txt",
75    ],
76    cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -t/ -k3 -n | tail -2 | head -1) $(genDir)/last-released-api-for-metalava-annotations.txt",
77    out: [
78        "last-released-api-for-metalava-annotations.txt",
79    ],
80}
81
82// This filegroup is to package android.jar into CtsUsesNativeLibraryTestCase
83filegroup {
84    name: "sdk_public_30_android.jar",
85    srcs: [
86        "30/public/android.jar",
87    ],
88    visibility: [
89        "//cts/hostsidetests/library",
90    ],
91}
92
93prebuilt_apis {
94    name: "sdk",
95    api_dirs: [
96        "1",
97        "2",
98        "3",
99        "4",
100        "5",
101        "6",
102        "7",
103        "8",
104        "9",
105        "10",
106        "11",
107        "12",
108        "13",
109        "14",
110        "15",
111        "16",
112        "17",
113        "18",
114        "19",
115        "20",
116        "21",
117        "22",
118        "23",
119        "24",
120        "25",
121        "26",
122        "27",
123        "28",
124        "29",
125        "30",
126        "31",
127        "32",
128        "33",
129        "34",
130        "35",
131        "36",
132        "current",
133    ],
134    extensions_dir: "extensions",
135    next_api_dir: "35",
136    imports_sdk_version: "none",
137    imports_compile_dex: true,
138}
139
140filegroup {
141    name: "prebuilt_sdk_system_public_api_txt",
142    srcs: [
143        "*/system/api/*.txt",
144        "*/public/api/*.txt",
145    ],
146}
147
148filegroup {
149    name: "prebuilt_sdk_system_api_android_txt",
150    srcs: [
151        "*/system/api/android.txt",
152    ],
153}
154
155filegroup {
156    name: "android27.txt",
157    srcs: [
158        "27/public/api/android.txt",
159    ],
160}
161