• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2022 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_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19java_library_host {
20    name: "sts-host-util",
21    defaults: ["cts_error_prone_rules"],
22
23    srcs: [
24        "src/**/*.java",
25    ],
26    static_libs: [
27        "auto_value_annotations",
28        "sts-common-util-lib",
29        "sts-libtombstone_proto-java",
30        "truth-prebuilt",
31        "xz-java",
32    ],
33    plugins: ["auto_value_plugin"],
34    libs: [
35        "compatibility-host-util",
36        "compatibility-tradefed",
37        "guava",
38        "tradefed",
39    ],
40}
41
42java_library_host {
43    name: "sts-libtombstone_proto-java",
44    visibility: [
45        "//platform_testing/libraries/sts-common-util/host-side",
46    ],
47    srcs: [
48        ":libtombstone_proto-src",
49    ],
50    proto: {
51        type: "lite",
52    },
53    static_libs: [
54        "libprotobuf-java-lite",
55    ],
56}
57
58// Turn off various doclava warnings when generating
59// the docs. These are the same warnings that are
60// turned off in tools/tradefed/core
61tradefed_docs_only_args = " -hide 101 -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 "
62
63droiddoc_host {
64    name: "sts-docs",
65    srcs: [
66        "src/**/*.java",
67    ],
68    libs: [
69        "auto_value_annotations",
70        "sts-common-util-lib",
71        "sts-libtombstone_proto-java",
72        "truth-prebuilt",
73        "xz-java",
74        "compatibility-host-util",
75        "compatibility-tradefed",
76        "guava",
77        "tradefed",
78    ],
79    custom_template: "droiddoc-templates-sdk",
80    // These settings are for integrating the javadoc with Devsite. See go/generate-tradefed-docs
81    hdf: [
82        "sac true",
83        "devices true",
84        "android.whichdoc online",
85        "css.path /reference/assets/css/doclava-devsite.css",
86        "book.root toc",
87        "book.path /_book.yaml",
88    ],
89    args: tradefed_docs_only_args +
90          "-yaml _toc.yaml " +
91          "-apidocsdir reference/sts/ " +
92          "-werror " +
93          "-package " +
94          "-devsite ",
95}
96
97cc_defaults {
98    name: "sts_defaults",
99    compile_multilib: "both",
100    multilib: {
101        lib32: {
102            suffix: "_sts32",
103        },
104        lib64: {
105            suffix: "_sts64",
106        },
107        // build/soong/common/arch.go default returns nil; no default possible
108    },
109    arch: {
110        arm: {
111            instruction_set: "arm",
112        },
113    },
114    auto_gen_config: false,
115    test_suites: [
116        "sts",
117    ],
118    cflags: [
119        "-Wall",
120        "-Werror",
121    ],
122}
123