blob: edbfb080ac112fd22140944d6c1ed0f6e16be2e6 [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 ],
21 java_resources: ["src/main/resources/**/*"],
22 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",
28}
Nan Zhangc6a42652018-06-06 16:51:05 -070029
Nan Zhang15b36592018-06-15 11:52:33 -070030java_library {
Nan Zhangc6a42652018-06-06 16:51:05 -070031 name: "stub-annotations",
Nan Zhang15b36592018-06-15 11:52:33 -070032 host_supported: true,
Nan Zhangc6a42652018-06-06 16:51:05 -070033 srcs: [
34 "stub-annotations/src/main/java/**/*.java",
35 ],
Nan Zhang15b36592018-06-15 11:52:33 -070036 no_framework_libs: true,
Nan Zhangc6a42652018-06-06 16:51:05 -070037}
Nan Zhang0006ae22018-07-13 16:33:51 -070038
39genrule {
40 name: "private-stub-annotations",
41 tools: [
42 "soong_zip",
43 "metalava",
44 ],
45 srcs: [
46 "stub-annotations/src/main/java/**/*.java",
47 ],
48 cmd: "($(location metalava) --no-banner --copy-annotations tools/metalava/stub-annotations " +
49 "$(genDir)/private-stub-annotations) && ($(location soong_zip) -o $(out) -C $(genDir) -D $(genDir))",
50 out: [
51 "private-stub-annotations.srcjar",
52 ],
53}
54
55java_library {
56 name: "private-stub-annotations-jar",
57 host_supported: true,
58 srcs: [
59 ":private-stub-annotations",
60 ],
61 no_framework_libs: true,
62}