1// Copyright (C) 2018 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
15java_defaults {
16    name: "trebuchet-defaults",
17    javacflags: [
18        "-Xcoroutines=enable",
19    ],
20}
21
22java_library_host {
23    name: "trebuchet-core",
24    defaults: ["trebuchet-defaults"],
25    srcs: [
26        "core/common/src/main/**/*.kt",
27        "core/model/src/main/**/*.kt",
28    ],
29    libs: [
30        "kotlin-reflect",
31    ],
32}
33
34java_library_host {
35    name: "trebuchet-startup-common",
36    defaults: ["trebuchet-defaults"],
37    srcs: [
38        "trebuchet/startup-common/src/**/*.kt",
39    ],
40    libs: [
41        "trebuchet-core",
42    ],
43}
44
45java_test_host {
46    name: "trebuchet-core-tests",
47    defaults: ["trebuchet-defaults"],
48    srcs: [
49        "core/common/src/test/**/*.kt",
50    ],
51    static_libs: [
52        "trebuchet-core",
53        "kotlin-test",
54    ],
55    libs: [
56        "junit",
57        "kotlin-reflect",
58    ],
59    test_suites: ["general-tests"],
60}
61
62java_test_host {
63    name: "trebuchet-startup-common-tests",
64    defaults: ["trebuchet-defaults"],
65    srcs: [
66        "trebuchet/startup-common/test/**/*.kt",
67    ],
68    static_libs: [
69        "trebuchet-core",
70        "trebuchet-startup-common",
71    ],
72    libs: [
73        "junit",
74    ],
75    test_suites: ["general-tests"],
76}
77
78java_binary_host {
79    name: "AnalyzerKt",
80    defaults: ["trebuchet-defaults"],
81    manifest: "trebuchet/analyzer/MANIFEST.mf",
82    srcs: [
83        "trebuchet/analyzer/src/**/*.kt",
84    ],
85    static_libs: [
86        "trebuchet-core",
87    ],
88}
89
90java_binary_host {
91    name: "StartupAnalyzerKt",
92    defaults: ["trebuchet-defaults"],
93    manifest: "trebuchet/startup-analyzer/MANIFEST.mf",
94    srcs: [
95        "trebuchet/startup-analyzer/src/**/*.kt",
96    ],
97    static_libs: [
98        "trebuchet-core",
99        "trebuchet-startup-common"
100    ],
101}
102
103java_binary_host {
104    name: "StartupSummarizerKt",
105    defaults: ["trebuchet-defaults"],
106    manifest: "trebuchet/startup-summarizer/MANIFEST.mf",
107    srcs: [
108        "trebuchet/startup-summarizer/src/**/*.kt",
109    ],
110    static_libs: [
111        "trebuchet-core",
112        "trebuchet-startup-common"
113    ],
114}
115
116java_binary_host {
117    name: "traceutils",
118    defaults: ["trebuchet-defaults"],
119    manifest: "trebuchet/traceutils/MANIFEST.mf",
120    srcs: [
121        "trebuchet/traceutils/src/**/*.kt",
122    ],
123    static_libs: [
124        "trebuchet-core",
125    ],
126}
127
128java_binary_host {
129    name: "traceviewer",
130    defaults: ["trebuchet-defaults"],
131    manifest: "trebuchet/viewer/MANIFEST.mf",
132    srcs: [
133        "trebuchet/viewer/src/main/**/*.kt",
134    ],
135    static_libs: [
136        "trebuchet-core",
137    ],
138}
139