1// Copyright (C) 2019 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
19genrule_defaults {
20    name: "signature-cts-api-api-gz",
21    cmd: "$(location metalava) --no-banner --compatible-output=no -convert2xmlnostrip $(in) $(genDir)/api.xml && gzip -c $(genDir)/api.xml > $(out)",
22    tools: ["metalava"],
23    visibility: [
24        "//cts/tests/signature/api-check:__subpackages__",
25        "//cts/tests/signature/intent-check",
26    ],
27}
28
29genrule {
30    name: "cts-current-api-gz",
31    defaults: ["signature-cts-api-api-gz"],
32    srcs: [
33        ":frameworks-base-api-current.txt",
34    ],
35    out: [
36        "current.api.gz",
37    ],
38}
39
40genrule {
41    name: "cts-system-current-api-gz",
42    defaults: ["signature-cts-api-api-gz"],
43    srcs: [
44        ":frameworks-base-api-system-current.txt",
45    ],
46    out: [
47        "system-current.api.gz",
48    ],
49}
50
51genrule {
52    name: "cts-system-removed-api-gz",
53    defaults: ["signature-cts-api-api-gz"],
54    srcs: [
55        ":frameworks-base-api-system-removed.txt",
56    ],
57    out: [
58        "system-removed.api.gz",
59    ],
60}
61
62genrule {
63    name: "cts-android-test-base-current-api-gz",
64    defaults: ["signature-cts-api-api-gz"],
65    srcs: [
66        ":android-test-base-current.txt",
67    ],
68    out: [
69        "android-test-base-current.api.gz",
70    ],
71}
72
73genrule {
74    name: "cts-android-test-mock-current-api-gz",
75    defaults: ["signature-cts-api-api-gz"],
76    srcs: [
77        ":android-test-mock-current.txt",
78    ],
79    out: [
80        "android-test-mock-current.api.gz",
81    ],
82}
83
84genrule {
85    name: "cts-android-test-runner-current-api-gz",
86    defaults: ["signature-cts-api-api-gz"],
87    srcs: [
88        ":android-test-runner-current.txt",
89    ],
90    out: [
91        "android-test-runner-current.api.gz",
92    ],
93}
94
95genrule {
96    name: "cts-apache-http-legacy-current-api-gz",
97    defaults: ["signature-cts-api-api-gz"],
98    srcs: [
99        ":apache-http-legacy-current.txt",
100    ],
101    out: [
102        "apache-http-legacy-current.api.gz",
103    ],
104}
105
106genrule {
107    name: "cts-car-system-current-api-gz",
108    defaults: ["signature-cts-api-api-gz"],
109    srcs: [
110        ":car-api-system-current.txt",
111    ],
112    out: [
113        "car-system-current.api.gz",
114    ],
115}
116
117genrule {
118    name: "cts-car-system-removed-api-gz",
119    defaults: ["signature-cts-api-api-gz"],
120    srcs: [
121        ":car-api-system-removed.txt",
122    ],
123    out: [
124        "car-system-removed.api.gz",
125    ],
126}
127