1//
2// Copyright (C) 2017 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
21android_app {
22    name: "CarMessengerApp",
23
24    srcs: ["src/**/*.java"],
25
26    resource_dirs: ["res"],
27
28    min_sdk_version: "30",
29
30    target_sdk_version: "31",
31
32    sdk_version: "system_current",
33
34    required: ["allowed_privapp_com.android.car.messenger"],
35
36    certificate: "platform",
37
38    overrides: ["messaging"],
39
40    optimize: {
41        enabled: false,
42    },
43
44    privileged: true,
45
46    libs: ["android.car-system-stubs"],
47
48    // must be unbundled dependencies
49    static_libs: [
50        "androidx-constraintlayout_constraintlayout",
51        "androidx.lifecycle_lifecycle-common-java8",
52        "androidx.lifecycle_lifecycle-extensions",
53        "androidx.legacy_legacy-support-v4",
54        "androidx.preference_preference",
55        "androidx.recyclerview_recyclerview",
56        "car-assist-lib",
57        "car-messenger-common",
58        "car-telephony-common",
59        "car-ui-lib",
60        "androidx.annotation_annotation",
61    ],
62
63    dex_preopt: {
64        enabled: false,
65    },
66
67    product_variables: {
68        pdk: {
69            enabled: false,
70        },
71    },
72}
73
74android_test_helper_app {
75    name: "CarMessengerAppForTesting",
76
77    srcs: ["src/**/*.java"],
78
79    resource_dirs: ["res"],
80
81    min_sdk_version: "30",
82
83    target_sdk_version: "31",
84
85    sdk_version: "system_current",
86
87    required: ["allowed_privapp_com.android.car.messenger"],
88
89    certificate: "platform",
90
91    overrides: ["messaging"],
92
93    optimize: {
94        enabled: false,
95    },
96
97    privileged: true,
98
99    libs: ["android.car-system-stubs"],
100
101    // must be unbundled dependencies
102    static_libs: [
103        "androidx-constraintlayout_constraintlayout",
104        "androidx.lifecycle_lifecycle-common-java8",
105        "androidx.lifecycle_lifecycle-extensions",
106        "androidx.legacy_legacy-support-v4",
107        "androidx.preference_preference",
108        "androidx.recyclerview_recyclerview",
109        "car-assist-lib",
110        "car-messenger-common",
111        "car-telephony-common",
112        "car-ui-lib",
113        "androidx.annotation_annotation",
114    ],
115
116    dex_preopt: {
117        enabled: false,
118    },
119
120    product_variables: {
121        pdk: {
122            enabled: false,
123        },
124    },
125
126    // runtime cc library which is used by mockito-target-extended.
127    jni_libs: [
128        // For mockito extended
129        "libdexmakerjvmtiagent",
130        "libstaticjvmtiagent",
131    ],
132
133    // Enforce the jni libraries to be grouped into the APK file.
134    use_embedded_native_libs: true,
135}
136