1//
2// Copyright (C) 2020 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_defaults {
22    name: "CtsSplitAppFeatureWarmDefaults",
23    defaults: ["cts_support_defaults"],
24    srcs: ["src/**/*.java"],
25    asset_dirs: ["assets"],
26    sdk_version: "current",
27    min_sdk_version: "4",
28    aapt_include_all_resources: true,
29    libs: ["CtsSplitApp"],
30}
31
32android_test_helper_app {
33    name: "CtsSplitAppFeatureWarm",
34    defaults: ["CtsSplitAppFeatureWarmDefaults"],
35    package_splits: [
36        "v7",
37        "v23",
38    ],
39    certificate: ":cts-testkey1",
40    aaptflags: [
41        "--version-code 100",
42        "--version-name OneHundred",
43        "--replace-version",
44        "--package-id 0x80",
45    ],
46    test_suites: [
47        "cts",
48        "general-tests",
49    ],
50}
51
52// Define a variant requiring a split for install
53android_test_helper_app {
54    name: "CtsNeedSplitFeatureWarm",
55    defaults: ["CtsSplitAppFeatureWarmDefaults"],
56    manifest: "needsplit/AndroidManifest.xml",
57    package_splits: ["v7"],
58    certificate: ":cts-testkey1",
59    aaptflags: [
60        "--version-code 100",
61        "--revision-code 12",
62        "--version-name OneHundredRevisionTwelve",
63        "--replace-version",
64        "--package-id 0x80",
65    ],
66    test_suites: [
67        "cts",
68        "general-tests",
69    ],
70}
71
72// Define a variant with different codes and resources for the inherit updated test of the
73// feature_warm apk
74android_test_helper_app {
75    name: "CtsSplitAppFeatureWarmRevisionA",
76    defaults: ["CtsSplitAppFeatureWarmDefaults"],
77    srcs: ["src/**/*.java", "revision_a/src/**/*.java"],
78    resource_dirs: ["res", "revision_a/res"],
79    asset_dirs: ["revision_a/assets"],
80    manifest : "revision_a/AndroidManifest.xml",
81    package_splits: ["v7"],
82    certificate: ":cts-testkey1",
83    aaptflags: [
84        "--version-code 100",
85        "--revision-code 10",
86        "--version-name OneHundredRevisionTen",
87        "--replace-version",
88        "--package-id 0x80",
89        "--auto-add-overlay",
90    ],
91    test_suites: [
92        "cts",
93        "general-tests",
94    ],
95}
96