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) signature-to-jdiff $(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        "//cts/hostsidetests/devicepolicy",
27    ],
28}
29
30genrule {
31    name: "cts-current-api-gz",
32    defaults: ["signature-cts-api-api-gz"],
33    srcs: [
34        ":frameworks-base-api-current.txt",
35    ],
36    out: [
37        "current.api.gz",
38    ],
39}
40
41genrule {
42    name: "cts-system-current-api-gz",
43    defaults: ["signature-cts-api-api-gz"],
44    srcs: [
45        ":frameworks-base-api-system-current.txt",
46    ],
47    out: [
48        "system-current.api.gz",
49    ],
50}
51
52genrule {
53    name: "cts-system-removed-api-gz",
54    defaults: ["signature-cts-api-api-gz"],
55    srcs: [
56        ":frameworks-base-api-system-removed.txt",
57    ],
58    out: [
59        "system-removed.api.gz",
60    ],
61}
62
63genrule {
64    name: "cts-android-test-base-current-api-gz",
65    defaults: ["signature-cts-api-api-gz"],
66    srcs: [
67        ":android-test-base-current.txt",
68    ],
69    out: [
70        "android-test-base-current.api.gz",
71    ],
72}
73
74genrule {
75    name: "cts-android-test-mock-current-api-gz",
76    defaults: ["signature-cts-api-api-gz"],
77    srcs: [
78        ":android-test-mock-current.txt",
79    ],
80    out: [
81        "android-test-mock-current.api.gz",
82    ],
83}
84
85genrule {
86    name: "cts-android-test-runner-current-api-gz",
87    defaults: ["signature-cts-api-api-gz"],
88    srcs: [
89        ":android-test-runner-current.txt",
90    ],
91    out: [
92        "android-test-runner-current.api.gz",
93    ],
94}
95
96genrule {
97    name: "cts-apache-http-legacy-current-api-gz",
98    defaults: ["signature-cts-api-api-gz"],
99    srcs: [
100        ":apache-http-legacy-current.txt",
101    ],
102    out: [
103        "apache-http-legacy-current.api.gz",
104    ],
105}
106
107genrule {
108    name: "cts-car-system-current-api-gz",
109    defaults: ["signature-cts-api-api-gz"],
110    srcs: [
111        ":car-api-system-current.txt",
112    ],
113    out: [
114        "car-system-current.api.gz",
115    ],
116}
117
118genrule {
119    name: "cts-car-system-removed-api-gz",
120    defaults: ["signature-cts-api-api-gz"],
121    srcs: [
122        ":car-api-system-removed.txt",
123    ],
124    out: [
125        "car-system-removed.api.gz",
126    ],
127}
128