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
21cc_test_library {
22    name: "libsplitappjni_isolated",
23    defaults: ["split_native_defaults"],
24    header_libs: ["jni_headers"],
25    shared_libs: ["liblog"],
26    srcs: ["jni/com_android_cts_isolatedsplitapp_Native.cpp"],
27}
28
29java_defaults {
30    name: "CtsSplitTestHelperApp_isolated_defaults",
31    compile_multilib: "both",
32
33    // TODO(b/179744452): Please add the following properties in individual modules because these
34    //                    properties can't inherit from java_defaults.
35    use_embedded_native_libs: false, // android:extractNativeLibs="true"
36    test_suites: TARGET_TEST_SUITES,
37}
38
39/**
40  * Isolated feature split with extracting native library
41  */
42android_test_helper_app {
43    name: "CtsIsolatedSplitAppExtractNativeLibsTrueJni",
44    defaults: ["CtsSplitTestHelperApp_isolated_defaults"],
45    manifest: "AndroidManifest_isolated_jni.xml",
46    jni_libs: ["libsplitappjni_isolated"],
47    use_embedded_native_libs: false, // android:extractNativeLibs="true"
48    srcs: ["src/**/*.java"],
49    test_suites: TARGET_TEST_SUITES,
50    sdk_version: "test_current",
51}
52
53android_test_helper_app {
54    name: "CtsIsolatedSplitAppExtractNativeLibsTrueNumberProviderA",
55    defaults: ["CtsSplitTestHelperApp_isolated_defaults"],
56    manifest: "AndroidManifest_isolated_number_provider_a.xml",
57    jni_libs: ["libsplitapp_number_provider_a"],
58    use_embedded_native_libs: false, // android:extractNativeLibs="true"
59    test_suites: TARGET_TEST_SUITES,
60    sdk_version: "test_current",
61}
62
63android_test_helper_app {
64    name: "CtsIsolatedSplitAppExtractNativeLibsTrueNumberProviderB",
65    defaults: ["CtsSplitTestHelperApp_isolated_defaults"],
66    manifest: "AndroidManifest_isolated_number_provider_b.xml",
67    jni_libs: ["libsplitapp_number_provider_b"],
68    use_embedded_native_libs: false, // android:extractNativeLibs="true"
69    test_suites: TARGET_TEST_SUITES,
70    sdk_version: "test_current",
71}
72
73android_test_helper_app {
74    name: "CtsIsolatedSplitAppExtractNativeLibsTrueNumberProxy",
75    defaults: ["CtsSplitTestHelperApp_isolated_defaults"],
76    manifest: "AndroidManifest_isolated_number_proxy.xml",
77    jni_libs: ["libsplitapp_number_proxy"],
78    use_embedded_native_libs: false, // android:extractNativeLibs="true"
79    test_suites: TARGET_TEST_SUITES,
80    sdk_version: "test_current",
81}
82
83/**
84  * Isolated feature split without extracting native library
85  */
86android_test_helper_app {
87    name: "CtsIsolatedSplitAppExtractNativeLibsFalseJni",
88    defaults: ["CtsSplitTestHelperApp_isolated_defaults"],
89    manifest: "AndroidManifest_isolated_jni.xml",
90    jni_libs: ["libsplitappjni_isolated"],
91    use_embedded_native_libs: true, // android:extractNativeLibs="false"
92    srcs: ["src/**/*.java"],
93    test_suites: TARGET_TEST_SUITES,
94    sdk_version: "test_current",
95}
96
97android_test_helper_app {
98    name: "CtsIsolatedSplitAppExtractNativeLibsFalseNumberProviderA",
99    defaults: ["CtsSplitTestHelperApp_isolated_defaults"],
100    manifest: "AndroidManifest_isolated_number_provider_a.xml",
101    jni_libs: ["libsplitapp_number_provider_a"],
102    use_embedded_native_libs: true, // android:extractNativeLibs="false"
103    test_suites: TARGET_TEST_SUITES,
104    sdk_version: "test_current",
105}
106
107android_test_helper_app {
108    name: "CtsIsolatedSplitAppExtractNativeLibsFalseNumberProviderB",
109    defaults: ["CtsSplitTestHelperApp_isolated_defaults"],
110    manifest: "AndroidManifest_isolated_number_provider_b.xml",
111    jni_libs: ["libsplitapp_number_provider_b"],
112    use_embedded_native_libs: true, // android:extractNativeLibs="false"
113    test_suites: TARGET_TEST_SUITES,
114    sdk_version: "test_current",
115}
116
117android_test_helper_app {
118    name: "CtsIsolatedSplitAppExtractNativeLibsFalseNumberProxy",
119    defaults: ["CtsSplitTestHelperApp_isolated_defaults"],
120    manifest: "AndroidManifest_isolated_number_proxy.xml",
121    jni_libs: ["libsplitapp_number_proxy"],
122    use_embedded_native_libs: true, // android:extractNativeLibs="false"
123    test_suites: TARGET_TEST_SUITES,
124    sdk_version: "test_current",
125}
126