blob: 0540aee1d6d925fbb270ff32e61dcb8e6a2bc302 [file] [log] [blame]
Winson Chung10a9b4b2019-12-18 10:01:36 -08001// Copyright (C) 2019 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
Winson Chungb754f522020-08-03 22:17:08 -070015// Begin ProtoLog
16java_library {
17 name: "wm_shell_protolog-groups",
18 srcs: [
19 "src/com/android/wm/shell/protolog/ShellProtoLogGroup.java",
20 ":protolog-common-src",
21 ],
22}
23
24filegroup {
25 name: "wm_shell-sources",
Bill Lin2b3bd572020-09-03 23:22:14 +080026 srcs: [
27 "src/**/*.java",
28 ],
29 path: "src",
30}
31
32// TODO(b/168581922) protologtool do not support kotlin(*.kt)
33filegroup {
34 name: "wm_shell-sources-kt",
35 srcs: [
36 "src/**/*.kt",
37 ],
Winson Chungb754f522020-08-03 22:17:08 -070038 path: "src",
39}
40
41genrule {
42 name: "wm_shell_protolog_src",
43 srcs: [
44 ":wm_shell_protolog-groups",
45 ":wm_shell-sources",
46 ],
47 tools: ["protologtool"],
48 cmd: "$(location protologtool) transform-protolog-calls " +
49 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
50 "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " +
51 "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " +
52 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
53 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
54 "--output-srcjar $(out) " +
55 "$(locations :wm_shell-sources)",
56 out: ["wm_shell_protolog.srcjar"],
57}
58
59genrule {
60 name: "generate-wm_shell_protolog.json",
61 srcs: [
62 ":wm_shell_protolog-groups",
63 ":wm_shell-sources",
64 ],
65 tools: ["protologtool"],
66 cmd: "$(location protologtool) generate-viewer-config " +
67 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
68 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
69 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
70 "--viewer-conf $(out) " +
71 "$(locations :wm_shell-sources)",
72 out: ["wm_shell_protolog.json"],
73}
Winson Chungb754f522020-08-03 22:17:08 -070074// End ProtoLog
75
Winson Chungeb1aa3d2020-08-25 19:02:29 -070076java_library {
77 name: "WindowManager-Shell-proto",
78
79 srcs: ["proto/*.proto"],
80
81 proto: {
82 type: "nano",
83 },
84}
85
Winson Chung10a9b4b2019-12-18 10:01:36 -080086android_library {
87 name: "WindowManager-Shell",
88 srcs: [
Winson Chungb754f522020-08-03 22:17:08 -070089 ":wm_shell_protolog_src",
Bill Lin2b3bd572020-09-03 23:22:14 +080090 // TODO(b/168581922) protologtool do not support kotlin(*.kt)
91 ":wm_shell-sources-kt",
Winson Chung10a9b4b2019-12-18 10:01:36 -080092 "src/**/I*.aidl",
93 ],
94 resource_dirs: [
95 "res",
96 ],
Winson Chung9169b372021-02-12 00:29:24 -080097 java_resources: [
98 ":generate-wm_shell_protolog.json"
99 ],
Winson Chungb754f522020-08-03 22:17:08 -0700100 static_libs: [
Tony Huangeb01a252020-10-27 11:37:11 +0800101 "androidx.appcompat_appcompat",
102 "androidx.arch.core_core-runtime",
Bill Lin2b3bd572020-09-03 23:22:14 +0800103 "androidx.dynamicanimation_dynamicanimation",
104 "kotlinx-coroutines-android",
105 "kotlinx-coroutines-core",
Tony Huangeb01a252020-10-27 11:37:11 +0800106 "iconloader_base",
Winson Chung94132e12020-11-09 19:42:12 -0800107 "jsr330",
Winson Chungb754f522020-08-03 22:17:08 -0700108 "protolog-lib",
Tony Huangeb01a252020-10-27 11:37:11 +0800109 "SettingsLib",
Winson Chungeb1aa3d2020-08-25 19:02:29 -0700110 "WindowManager-Shell-proto",
Dave Mankoff9179b302020-12-02 11:15:27 -0500111 "jsr330"
Winson Chungb754f522020-08-03 22:17:08 -0700112 ],
Bill Lin2b3bd572020-09-03 23:22:14 +0800113 kotlincflags: ["-Xjvm-default=enable"],
Winson Chung10a9b4b2019-12-18 10:01:36 -0800114 manifest: "AndroidManifest.xml",
Bill Lin2b3bd572020-09-03 23:22:14 +0800115
116 min_sdk_version: "26",
Dave Mankoff9179b302020-12-02 11:15:27 -0500117}