1//
2// Copyright (C) 2018 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//
16package {
17    default_team: "trendy_team_framework_android_packages",
18    // See: http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // all of the 'license_kinds' from "packages_modules_adb_license"
21    // to get the below license kinds:
22    //   SPDX-license-identifier-Apache-2.0
23    default_applicable_licenses: ["packages_modules_adb_license"],
24}
25
26java_library {
27    name: "deployagent_lib",
28    sdk_version: "24",
29    srcs: [
30        "deployagent/src/**/*.java",
31        "proto/**/*.proto",
32    ],
33    proto: {
34        type: "lite",
35    },
36}
37
38java_binary {
39    name: "deployagent",
40    wrapper: "deployagent/deployagent.sh",
41    sdk_version: "24",
42    static_libs: [
43        "deployagent_lib",
44    ],
45    dex_preopt: {
46        enabled: false,
47    },
48}
49
50android_test {
51    name: "FastDeployTests",
52
53    manifest: "AndroidManifest.xml",
54
55    srcs: [
56        "deployagent/test/com/android/fastdeploy/ApkArchiveTest.java",
57    ],
58
59    static_libs: [
60        "androidx.test.core",
61        "androidx.test.runner",
62        "androidx.test.rules",
63        "deployagent_lib",
64        "mockito-target-inline-minus-junit4",
65    ],
66
67    libs: [
68        "android.test.runner",
69        "android.test.base",
70        "android.test.mock",
71    ],
72
73    data: [
74        "testdata/sample.apk",
75        "testdata/sample.cd",
76    ],
77
78    optimize: {
79        enabled: false,
80    },
81
82    test_config: "FastDeployTests.xml",
83
84    test_suites: [
85        "general-tests",
86    ],
87}
88
89java_test_host {
90    name: "FastDeployHostTests",
91    srcs: [
92        "deployagent/test/com/android/fastdeploy/FastDeployTest.java",
93    ],
94    data: [
95        "testdata/helloworld5.apk",
96        "testdata/helloworld7.apk",
97        "testdata/sample.apk",
98        "testdata/sample.cd",
99    ],
100    libs: [
101        "compatibility-host-util",
102        "cts-tradefed",
103        "tradefed",
104    ],
105    test_suites: [
106        "general-tests",
107    ],
108    test_config: "FastDeployHostDrivenTests.xml",
109}
110