1// Copyright (C) 2021 The Android Open Source Project
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
15package {
16    default_team: "trendy_team_rubidium_sdk_runtime",
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20java_test_host {
21    name: "SdkSandboxLifecycleHostTest",
22    srcs: [
23        "src/**/SdkSandboxLifecycleHostTest.java",
24        ":CtsHostsideTestsAppSecurityUtil",
25    ],
26    test_config: "SdkSandboxLifecycleHostTest.xml",
27    libs: ["tradefed"],
28    test_suites: ["general-tests"],
29    static_libs: [
30        "cts-install-lib-host",
31        "modules-utils-build-testing",
32        "SdkSandboxHostTestUtils",
33    ],
34    data: [
35        ":TestCodeProvider",
36        ":TestCodeProvider2",
37        ":SdkSandboxTestApp",
38        ":SdkSandboxTestApp2",
39        ":SdkSandboxTestSharedApp1",
40        ":SdkSandboxTestSharedApp2",
41    ],
42    compile_multilib: "both",
43}
44
45java_test_host {
46    name: "SdkSandboxShellHostTest",
47    srcs: ["src/**/SdkSandboxShellHostTest.java"],
48    test_config: "SdkSandboxShellHostTest.xml",
49    libs: ["tradefed"],
50    test_suites: ["general-tests"],
51    static_libs: [
52        "SdkSandboxHostTestUtils",
53    ],
54    data: [
55        ":TestCodeProvider",
56        ":TestCodeProvider2",
57        ":SdkSandboxTestApp",
58        ":SdkSandboxTestDebuggableApp",
59    ],
60}
61
62android_test_helper_app {
63    name: "SdkSandboxTestApp",
64    manifest: "app/SdkSandboxTestAppManifest.xml",
65    defaults: ["platform_app_defaults"],
66    platform_apis: true,
67    srcs: [
68        "app/src/**/SdkSandboxTestActivity.java",
69    ],
70    static_libs: [
71        "androidx.core_core",
72        "androidx.test.ext.junit",
73        "SdkSandboxTestUtils",
74        "SdkSandbox-java-lib",
75    ],
76    min_sdk_version: "33",
77    target_sdk_version: "33",
78}
79
80android_test_helper_app {
81    name: "SdkSandboxTestApp2",
82    manifest: "app/SdkSandboxTestApp2Manifest.xml",
83    defaults: ["platform_app_defaults"],
84    platform_apis: true,
85    srcs: [
86        "app/src/**/SdkSandboxEmptyActivity.java",
87        "app/src/**/SdkSandboxTestActivity2.java",
88    ],
89    static_libs: [
90        "androidx.core_core",
91        "SdkSandboxTestUtils",
92        "SdkSandbox-java-lib",
93    ],
94    min_sdk_version: "33",
95    target_sdk_version: "33",
96}
97
98android_test_helper_app {
99    name: "SdkSandboxTestDebuggableApp",
100    manifest: "app/SdkSandboxTestDebuggableAppManifest.xml",
101    defaults: ["platform_app_defaults"],
102    platform_apis: true,
103    srcs: [
104        "app/src/**/SdkSandboxTestDebuggableActivity.java",
105    ],
106    static_libs: [
107        "androidx.core_core",
108        "SdkSandboxTestUtils",
109        "SdkSandbox-java-lib",
110    ],
111    min_sdk_version: "33",
112    target_sdk_version: "33",
113}
114
115android_test_helper_app {
116    name: "SdkSandboxTestSharedApp1",
117    manifest: "app/SdkSandboxTestSharedApp1Manifest.xml",
118    srcs: [
119        "app/src/**/SdkSandboxTestSharedActivity.java",
120        ":framework-sdksandbox-sources",
121        ":sdksandbox_aidl",
122        ":sdksandbox-sources",
123    ],
124    defaults: ["framework-sdksandbox-jarjar-defaults"],
125    test_suites: ["general-tests"],
126    static_libs: [
127        "androidx.core_core",
128        "compatibility-device-util-axt",
129        "SdkSandboxTestUtils",
130    ],
131    platform_apis: true,
132    min_sdk_version: "33",
133    target_sdk_version: "33",
134}
135
136android_test_helper_app {
137    name: "SdkSandboxTestSharedApp2",
138    manifest: "app/SdkSandboxTestSharedApp2Manifest.xml",
139    srcs: [
140        "app/src/**/SdkSandboxTestSharedApp2.java",
141        "app/src/**/shared/app2/SdkSandboxEmptyActivity.java",
142        ":framework-sdksandbox-sources",
143        ":sdksandbox_aidl",
144        ":sdksandbox-sources",
145    ],
146    defaults: ["framework-sdksandbox-jarjar-defaults"],
147    test_suites: ["general-tests"],
148    static_libs: [
149        "androidx.core_core",
150        "androidx.test.ext.junit",
151        "compatibility-device-util-axt",
152        "SdkSandboxTestUtils",
153    ],
154    platform_apis: true,
155    min_sdk_version: "33",
156    target_sdk_version: "33",
157}
158
159android_test_helper_app {
160    name: "TestCodeProvider",
161    manifest: "codeprovider/TestCodeProviderManifest.xml",
162    defaults: ["platform_app_defaults"],
163    certificate: ":sdksandbox-test",
164    srcs: [
165        "codeprovider/src/**/TestSandboxedSdkProvider.java",
166    ],
167    libs: [
168        "framework-sdksandbox.impl",
169    ],
170    platform_apis: true,
171    min_sdk_version: "33",
172    target_sdk_version: "33",
173}
174
175android_test_helper_app {
176    name: "TestCodeProvider2",
177    manifest: "codeprovider/TestCodeProvider2Manifest.xml",
178    certificate: ":sdksandbox-test",
179    defaults: ["platform_app_defaults"],
180    srcs: [
181        "codeprovider/src/**/TestSandboxedSdkProvider2.java",
182    ],
183    libs: [
184        "framework-sdksandbox.impl",
185    ],
186    platform_apis: true,
187    min_sdk_version: "33",
188    target_sdk_version: "33",
189}
190