• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19java_library_host {
20    name: "metalava-signature-reader",
21    static_libs: [
22        "metalava-model",
23        "metalava-model-text",
24    ],
25}
26
27// Make the version.properties file available for `metalava-main` in `metalava`
28// directory.
29filegroup {
30    name: "metalava-version",
31    visibility: [
32        "//tools/metalava:__subpackages__",
33    ],
34    srcs: ["version.properties"],
35}
36
37java_library {
38    name: "stub-annotations",
39    host_supported: true,
40    srcs: [
41        "stub-annotations/src/main/java/**/*.java",
42    ],
43    // Allow core_current to use stub-annotations.
44    sdk_version: "28",
45    target: {
46        host: {
47            dist: {
48                targets: ["sdk"],
49            },
50        },
51    },
52}
53
54genrule {
55    name: "private-stub-annotations",
56    tools: [
57        "soong_zip",
58        "metalava",
59    ],
60    srcs: [
61        "stub-annotations/src/main/java/**/*.java",
62    ],
63    cmd: "($(location metalava) make-annotations-package-private " +
64        "tools/metalava/stub-annotations/src/main/java $(genDir)/private-stub-annotations) " +
65        "&& ($(location soong_zip) -o $(out) -C $(genDir) -D $(genDir))",
66    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    ],
77    sdk_version: "core_current",
78    // private-stub-annotations-jar ends up in android.jar in the SDK and should
79    // use -target 8.
80    java_version: "1.8",
81}
82
83droiddoc_exported_dir {
84    name: "metalava-manual",
85    path: "manual",
86}
87