Colin Cross | 88e0590 | 2018-06-05 14:06:39 -0700 | [diff] [blame] | 1 | // 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 | |
| 15 | java_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 Cross | 706dfa1 | 2018-06-05 17:25:31 -0700 | [diff] [blame] | 23 | "kotlin-reflect", |
Colin Cross | 88e0590 | 2018-06-05 14:06:39 -0700 | [diff] [blame] | 24 | "metalava-tools-common-m2-deps", |
| 25 | "metalava-gradle-plugin-deps", |
| 26 | ], |
| 27 | manifest: "manifest.txt", |
| 28 | } |
Nan Zhang | c6a4265 | 2018-06-06 16:51:05 -0700 | [diff] [blame] | 29 | |
Nan Zhang | 15b3659 | 2018-06-15 11:52:33 -0700 | [diff] [blame] | 30 | java_library { |
Nan Zhang | c6a4265 | 2018-06-06 16:51:05 -0700 | [diff] [blame] | 31 | name: "stub-annotations", |
Nan Zhang | 15b3659 | 2018-06-15 11:52:33 -0700 | [diff] [blame] | 32 | host_supported: true, |
Nan Zhang | c6a4265 | 2018-06-06 16:51:05 -0700 | [diff] [blame] | 33 | srcs: [ |
| 34 | "stub-annotations/src/main/java/**/*.java", |
| 35 | ], |
Nan Zhang | 15b3659 | 2018-06-15 11:52:33 -0700 | [diff] [blame] | 36 | no_framework_libs: true, |
Nan Zhang | c6a4265 | 2018-06-06 16:51:05 -0700 | [diff] [blame] | 37 | } |
Nan Zhang | 0006ae2 | 2018-07-13 16:33:51 -0700 | [diff] [blame^] | 38 | |
| 39 | genrule { |
| 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 | |
| 55 | java_library { |
| 56 | name: "private-stub-annotations-jar", |
| 57 | host_supported: true, |
| 58 | srcs: [ |
| 59 | ":private-stub-annotations", |
| 60 | ], |
| 61 | no_framework_libs: true, |
| 62 | } |