1//
2// Copyright (C) 2019 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: "cts_use_embedded_dex_test_defaults",
23    defaults: ["cts_support_defaults"],
24    srcs: ["src/**/*.java"],
25    sdk_version: "current",
26    test_suites: [
27        "cts",
28        "general-tests",
29    ],
30    static_libs: [
31        "androidx.test.rules",
32        "compatibility-device-util-axt",
33        "ctstestrunner-axt",
34        "ub-uiautomator",
35    ],
36    libs: [
37        "android.test.runner",
38        "android.test.base",
39    ],
40}
41
42android_test_helper_app {
43    name: "CtsUseEmbeddedDexApp_Canonical",
44    defaults: ["cts_use_embedded_dex_test_defaults"],
45    min_sdk_version: "27",
46    use_embedded_dex: true,
47}
48
49android_test_helper_app {
50    name: "CtsUseEmbeddedDexApp_DexCompressed",
51    defaults: ["cts_use_embedded_dex_test_defaults"],
52    // Not specifying use_embedded_dex keeps dex compressed
53    min_sdk_version: "28",
54}
55
56android_test_helper_app {
57    name: "CtsUseEmbeddedDexApp_NotPreferred",
58    defaults: ["cts_use_embedded_dex_test_defaults"],
59    manifest: "AndroidManifest_use_extracted_dex.xml",
60    min_sdk_version: "28",
61}
62
63android_test_helper_app {
64    name: "CtsUseEmbeddedDexAppSplit_Canonical",
65    defaults: ["cts_use_embedded_dex_test_defaults"],
66    manifest: "feature_split/AndroidManifest.xml",
67    // We want the dex to be uncompressed, but there is a side effect of extra
68    // android:useEmbeddedDex in the manifest (which the framework will ignore
69    // for split).
70    use_embedded_dex: true,
71    srcs: ["feature_split/src/**/*.java"],
72    sdk_version: "current",
73    min_sdk_version: "27",
74}
75
76android_test_helper_app {
77    name: "CtsUseEmbeddedDexAppSplit_CompressedDex",
78    defaults: ["cts_use_embedded_dex_test_defaults"],
79    manifest: "feature_split/AndroidManifest.xml",
80    srcs: ["feature_split/src/**/*.java"],
81    min_sdk_version: "27",
82}
83
84//android_test_helper_app {
85//    name: "CtsUseEmbeddedDexAppSplit_CompressedSo",
86//    defaults: ["cts_support_defaults"],
87//    manifest: "feature_split/AndroidManifest.xml",
88//    srcs: ["feature_split/src/**/*.java"],
89//    // ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_PREBUILT_JNI_LIBS
90//    // LOCAL_PREBUILT_JNI_LIBS := dummy.so
91//    sdk_version: "current",
92//    min_sdk_version: "27",
93//    test_suites: [
94//        "cts",
95//        "general-tests",
96//    ],
97//}
98