blob: 19fded627adfc20908297da55fabd4d6bdf754e6 [file] [log] [blame]
Colin Cross88e05902018-06-05 14:06:39 -07001// Copyright (C) 2018 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 Badour0d71f662021-02-12 15:51:13 -080015package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
Paul Duffin0cb7a9b2023-07-26 22:18:35 +010019java_library_host {
Paul Duffin4473d2f2023-07-28 13:48:47 +010020 name: "metalava-signature-reader",
21 static_libs: [
Paul Duffin60c73ed2023-08-04 00:04:40 +010022 "metalava-model",
Paul Duffin4473d2f2023-07-28 13:48:47 +010023 "metalava-model-text",
24 ],
25}
26
Paul Duffin16ceda22023-09-13 23:46:52 +010027// Make the version.properties file available for `metalava-main` in `metalava`
28// directory.
29filegroup {
30 name: "metalava-version",
Makoto Onukif2833f82020-06-02 14:00:38 -070031 visibility: [
Paul Duffin16ceda22023-09-13 23:46:52 +010032 "//tools/metalava:__subpackages__",
Makoto Onukif2833f82020-06-02 14:00:38 -070033 ],
Paul Duffin16ceda22023-09-13 23:46:52 +010034 srcs: ["version.properties"],
Colin Cross88e05902018-06-05 14:06:39 -070035}
Nan Zhangc6a42652018-06-06 16:51:05 -070036
Nan Zhang15b36592018-06-15 11:52:33 -070037java_library {
Nan Zhangc6a42652018-06-06 16:51:05 -070038 name: "stub-annotations",
Nan Zhang15b36592018-06-15 11:52:33 -070039 host_supported: true,
Nan Zhangc6a42652018-06-06 16:51:05 -070040 srcs: [
41 "stub-annotations/src/main/java/**/*.java",
42 ],
Paul Duffinb461b1e2019-10-17 11:03:07 +010043 // Allow core_current to use stub-annotations.
44 sdk_version: "28",
Jaewoong Jung07790ac2019-01-09 10:21:57 -080045 target: {
46 host: {
47 dist: {
48 targets: ["sdk"],
49 },
50 },
51 },
Nan Zhangc6a42652018-06-06 16:51:05 -070052}
Nan Zhang0006ae22018-07-13 16:33:51 -070053
54genrule {
55 name: "private-stub-annotations",
56 tools: [
57 "soong_zip",
58 "metalava",
59 ],
60 srcs: [
61 "stub-annotations/src/main/java/**/*.java",
62 ],
Paul Duffin10f732c2023-09-04 12:16:16 +010063 cmd: "($(location metalava) make-annotations-package-private " +
Paul Duffin4a2e2ab2023-09-07 22:56:19 +010064 "tools/metalava/stub-annotations/src/main/java $(genDir)/private-stub-annotations) " +
Paul Duffin10f732c2023-09-04 12:16:16 +010065 "&& ($(location soong_zip) -o $(out) -C $(genDir) -D $(genDir))",
Nan Zhang0006ae22018-07-13 16:33:51 -070066 out: [
67 "private-stub-annotations.srcjar",
68 ],
69}
70
71java_library {
72 name: "private-stub-annotations-jar",
73 host_supported: true,
74 srcs: [
75 ":private-stub-annotations",
76 ],
Neil Fullerf46a78e2018-09-26 17:11:13 +010077 sdk_version: "core_current",
Colin Cross6add4d42020-07-30 14:50:44 -070078 // private-stub-annotations-jar ends up in android.jar in the SDK and should
79 // use -target 8.
80 java_version: "1.8",
Nan Zhang0006ae22018-07-13 16:33:51 -070081}
Nan Zhang300968c2018-08-01 15:06:55 -070082
83droiddoc_exported_dir {
84 name: "metalava-manual",
85 path: "manual",
86}