1// Copyright (C) 2020 Google Inc.
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
15// v1 implementation of test app built with v1 manifest.
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20android_test_helper_app {
21    name: "IncrementalTestApp",
22    srcs: ["v1/src/**/*.java"],
23    dex_preopt: {
24        enabled: false,
25    },
26    optimize: {
27        enabled: false,
28    },
29    test_suites: [
30        "cts",
31        "general-tests",
32    ],
33    v4_signature: true,
34    static_libs: [
35        "incremental-install-common-lib",
36    ],
37    sdk_version: "test_current",
38    export_package_resources: true,
39    aapt_include_all_resources: true,
40    manifest: "AndroidManifestV1.xml",
41
42    // This flag allow the native lib to be compressed in the apk or associated split apk, and
43    // needs to be extracted by the installer instead of calling directly into the apk.
44    use_embedded_native_libs: false,
45}
46
47// v1 implementation of test app built with v1 manifest with uncompressed native libs.
48android_test_helper_app {
49    name: "IncrementalTestAppUncompressed",
50    srcs: ["v1/src/**/*.java"],
51    dex_preopt: {
52        enabled: false,
53    },
54    optimize: {
55        enabled: false,
56    },
57    test_suites: [
58        "cts",
59        "general-tests",
60    ],
61    v4_signature: true,
62    static_libs: [
63        "incremental-install-common-lib",
64    ],
65    sdk_version: "test_current",
66    export_package_resources: true,
67    aapt_include_all_resources: true,
68    manifest: "AndroidManifestV1.xml",
69
70    // This flag allow the native lib to be uncompressed in the apk or associated split apk, and
71    // does not need to be extracted by the installer.
72    use_embedded_native_libs: true,
73}
74
75// v2 implementation of test app built with v1 manifest for zero version update test.
76android_test_helper_app {
77    name: "IncrementalTestApp2_v1",
78    srcs: ["v2/src/**/*.java"],
79    dex_preopt: {
80        enabled: false,
81    },
82    optimize: {
83        enabled: false,
84    },
85    test_suites: [
86        "cts",
87        "general-tests",
88    ],
89    v4_signature: true,
90    static_libs: [
91        "incremental-install-common-lib",
92    ],
93    sdk_version: "test_current",
94    export_package_resources: true,
95    aapt_include_all_resources: true,
96    manifest: "AndroidManifestV1.xml",
97}
98
99// v2 implementation of test app built with v2 manifest for version update test.
100android_test_helper_app {
101    name: "IncrementalTestApp2_v2",
102    srcs: ["v2/src/**/*.java"],
103    dex_preopt: {
104        enabled: false,
105    },
106    optimize: {
107        enabled: false,
108    },
109    test_suites: [
110        "cts",
111        "general-tests",
112    ],
113    v4_signature: true,
114    static_libs: [
115        "incremental-install-common-lib",
116    ],
117    sdk_version: "test_current",
118    export_package_resources: true,
119    aapt_include_all_resources: true,
120    manifest: "AndroidManifestV2.xml",
121}
122