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