blob: c6ad0b3545efd0bffba24e17e9a944a422c30889 [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
15java_binary_host {
16 name: "metalava",
17 srcs: [
18 "src/main/java/**/*.java",
19 "src/main/java/**/*.kt",
20 ],
Jeff Gastonfcc3deb2019-01-22 15:51:32 -050021 java_resource_dirs: ["src/main/resources/"],
Colin Cross88e05902018-06-05 14:06:39 -070022 static_libs: [
Colin Cross706dfa12018-06-05 17:25:31 -070023 "kotlin-reflect",
Colin Cross88e05902018-06-05 14:06:39 -070024 "metalava-tools-common-m2-deps",
25 "metalava-gradle-plugin-deps",
26 ],
27 manifest: "manifest.txt",
Jaewoong Jung07790ac2019-01-09 10:21:57 -080028 dist: {
29 targets: ["sdk"],
30 },
Colin Cross88e05902018-06-05 14:06:39 -070031}
Nan Zhangc6a42652018-06-06 16:51:05 -070032
Nan Zhang15b36592018-06-15 11:52:33 -070033java_library {
Nan Zhangc6a42652018-06-06 16:51:05 -070034 name: "stub-annotations",
Nan Zhang15b36592018-06-15 11:52:33 -070035 host_supported: true,
Nan Zhangc6a42652018-06-06 16:51:05 -070036 srcs: [
37 "stub-annotations/src/main/java/**/*.java",
38 ],
Neil Fullerf46a78e2018-09-26 17:11:13 +010039 sdk_version: "core_current",
Jaewoong Jung07790ac2019-01-09 10:21:57 -080040 target: {
41 host: {
42 dist: {
43 targets: ["sdk"],
44 },
45 },
46 },
Nan Zhangc6a42652018-06-06 16:51:05 -070047}
Nan Zhang0006ae22018-07-13 16:33:51 -070048
49genrule {
50 name: "private-stub-annotations",
51 tools: [
52 "soong_zip",
53 "metalava",
54 ],
55 srcs: [
56 "stub-annotations/src/main/java/**/*.java",
57 ],
58 cmd: "($(location metalava) --no-banner --copy-annotations tools/metalava/stub-annotations " +
Jaewoong Jung07790ac2019-01-09 10:21:57 -080059 "$(genDir)/private-stub-annotations) && ($(location soong_zip) -o $(out) -C $(genDir) -D $(genDir))",
Nan Zhang0006ae22018-07-13 16:33:51 -070060 out: [
61 "private-stub-annotations.srcjar",
62 ],
63}
64
65java_library {
66 name: "private-stub-annotations-jar",
67 host_supported: true,
68 srcs: [
69 ":private-stub-annotations",
70 ],
Neil Fullerf46a78e2018-09-26 17:11:13 +010071 sdk_version: "core_current",
Nan Zhang0006ae22018-07-13 16:33:51 -070072}
Nan Zhang300968c2018-08-01 15:06:55 -070073
74droiddoc_exported_dir {
75 name: "metalava-manual",
76 path: "manual",
77}