1//
2// Copyright (C) 2021 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21java_library {
22    name: "cts_signature_query_service",
23
24    srcs: ["src/**/*.java"] + ["src/**/I*.aidl"],
25    sdk_version: "current",
26}
27
28// This is the first version of the test app signed with the initial signing
29// key. This app exports the bound service from the cts_signature_query_service
30// library and is used to verify end to end updates with key rotation.
31android_test {
32    name: "CtsSignatureQueryService",
33    defaults: ["cts_support_defaults"],
34    compile_multilib: "both",
35    sdk_version: "current",
36    static_libs: ["cts_signature_query_service"],
37    certificate: ":cts-ec-p256",
38    v4_signature: true,
39    test_suites: [
40        "cts",
41        "general-tests",
42    ],
43}
44
45// This is the second version of the test app signed with the rotated signing
46// key with an updated version number. This app is intended to verify that an
47// app continues to function as expected after an update with a rotated key.
48android_test {
49    name: "CtsSignatureQueryService_v2",
50    defaults: ["cts_support_defaults"],
51    manifest: "AndroidManifest_v2.xml",
52    compile_multilib: "both",
53    sdk_version: "current",
54    static_libs: ["cts_signature_query_service"],
55    certificate: ":cts-ec-p256_2",
56    additional_certificates: [":cts-ec-p256"],
57    lineage: ":cts-ec-p256-por_1_2-default-caps.lineage",
58    v4_signature: true,
59    test_suites: [
60        "cts",
61        "general-tests",
62    ],
63}
64
65// This is the third version of the test app signed with the same rotated
66// signing key as v2. This app is intended to verify that an app can still
67// be updated and function as expected after the signing key has been rotated.
68android_test {
69    name: "CtsSignatureQueryService_v3",
70    defaults: ["cts_support_defaults"],
71    manifest: "AndroidManifest_v3.xml",
72    compile_multilib: "both",
73    sdk_version: "current",
74    static_libs: ["cts_signature_query_service"],
75    certificate: ":cts-ec-p256_2",
76    additional_certificates: [":cts-ec-p256"],
77    lineage: ":cts-ec-p256-por_1_2-default-caps.lineage",
78    v4_signature: true,
79    test_suites: [
80        "cts",
81        "general-tests",
82    ],
83}
84