blob: 73c2e8bfa78f79456c5b8fdbfd11d7849c9d7b65 [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
Bob Badour8a6a2bc2021-02-12 17:07:05 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "frameworks_base_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["frameworks_base_license"],
22}
23
Winson Chungb754f522020-08-03 22:17:08 -070024// Begin ProtoLog
25java_library {
26 name: "wm_shell_protolog-groups",
27 srcs: [
28 "src/com/android/wm/shell/protolog/ShellProtoLogGroup.java",
29 ":protolog-common-src",
30 ],
31}
32
33filegroup {
34 name: "wm_shell-sources",
Bill Lin2b3bd572020-09-03 23:22:14 +080035 srcs: [
36 "src/**/*.java",
37 ],
38 path: "src",
39}
40
Winson Chung92a8e1a2021-10-16 21:44:25 -070041// Sources that have no dependencies that can be used directly downstream of this library
Winson Chung2b72add2021-02-02 23:27:07 -080042filegroup {
Evan Rosky14ea8c62021-09-30 17:28:35 -070043 name: "wm_shell_util-sources",
44 srcs: [
45 "src/com/android/wm/shell/util/**/*.java",
46 ],
47 path: "src",
48}
49
Winson Chung92a8e1a2021-10-16 21:44:25 -070050// Aidls which can be used directly downstream of this library
Evan Rosky14ea8c62021-09-30 17:28:35 -070051filegroup {
Winson Chung2b72add2021-02-02 23:27:07 -080052 name: "wm_shell-aidls",
53 srcs: [
54 "src/**/*.aidl",
55 ],
56 path: "src",
57}
58
Bill Lin2b3bd572020-09-03 23:22:14 +080059// TODO(b/168581922) protologtool do not support kotlin(*.kt)
60filegroup {
61 name: "wm_shell-sources-kt",
62 srcs: [
63 "src/**/*.kt",
64 ],
Winson Chungb754f522020-08-03 22:17:08 -070065 path: "src",
66}
67
68genrule {
69 name: "wm_shell_protolog_src",
70 srcs: [
71 ":wm_shell_protolog-groups",
72 ":wm_shell-sources",
73 ],
74 tools: ["protologtool"],
75 cmd: "$(location protologtool) transform-protolog-calls " +
Quang Luong0c3b94e2021-03-19 16:55:23 +000076 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
77 "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " +
78 "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " +
79 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
80 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
81 "--output-srcjar $(out) " +
82 "$(locations :wm_shell-sources)",
Winson Chungb754f522020-08-03 22:17:08 -070083 out: ["wm_shell_protolog.srcjar"],
84}
85
86genrule {
87 name: "generate-wm_shell_protolog.json",
88 srcs: [
89 ":wm_shell_protolog-groups",
90 ":wm_shell-sources",
91 ],
92 tools: ["protologtool"],
93 cmd: "$(location protologtool) generate-viewer-config " +
Quang Luong0c3b94e2021-03-19 16:55:23 +000094 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
95 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
96 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
97 "--viewer-conf $(out) " +
98 "$(locations :wm_shell-sources)",
Winson Chungb754f522020-08-03 22:17:08 -070099 out: ["wm_shell_protolog.json"],
100}
Winson Chungb754f522020-08-03 22:17:08 -0700101// End ProtoLog
102
Winson Chungeb1aa3d2020-08-25 19:02:29 -0700103java_library {
104 name: "WindowManager-Shell-proto",
105
106 srcs: ["proto/*.proto"],
107
108 proto: {
109 type: "nano",
110 },
111}
112
Winson Chung10a9b4b2019-12-18 10:01:36 -0800113android_library {
114 name: "WindowManager-Shell",
115 srcs: [
Winson Chungb754f522020-08-03 22:17:08 -0700116 ":wm_shell_protolog_src",
Bill Lin2b3bd572020-09-03 23:22:14 +0800117 // TODO(b/168581922) protologtool do not support kotlin(*.kt)
118 ":wm_shell-sources-kt",
Winson Chung2b72add2021-02-02 23:27:07 -0800119 ":wm_shell-aidls",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800120 ],
121 resource_dirs: [
122 "res",
123 ],
Winson Chung9169b372021-02-12 00:29:24 -0800124 java_resources: [
Quang Luong0c3b94e2021-03-19 16:55:23 +0000125 ":generate-wm_shell_protolog.json"
Winson Chung9169b372021-02-12 00:29:24 -0800126 ],
Winson Chungb754f522020-08-03 22:17:08 -0700127 static_libs: [
Tony Huangeb01a252020-10-27 11:37:11 +0800128 "androidx.appcompat_appcompat",
129 "androidx.arch.core_core-runtime",
Bill Lin2b3bd572020-09-03 23:22:14 +0800130 "androidx.dynamicanimation_dynamicanimation",
Sunny Goyaldcdee332021-03-30 09:42:19 -0700131 "androidx.recyclerview_recyclerview",
Bill Lin2b3bd572020-09-03 23:22:14 +0800132 "kotlinx-coroutines-android",
133 "kotlinx-coroutines-core",
Tony Huangeb01a252020-10-27 11:37:11 +0800134 "iconloader_base",
Winson Chung94132e12020-11-09 19:42:12 -0800135 "jsr330",
Winson Chungb754f522020-08-03 22:17:08 -0700136 "protolog-lib",
Winson Chungeb1aa3d2020-08-25 19:02:29 -0700137 "WindowManager-Shell-proto",
Sunny Goyaldcdee332021-03-30 09:42:19 -0700138 "jsr330",
Winson Chungb754f522020-08-03 22:17:08 -0700139 ],
Bill Lin2b3bd572020-09-03 23:22:14 +0800140 kotlincflags: ["-Xjvm-default=enable"],
Winson Chung10a9b4b2019-12-18 10:01:36 -0800141 manifest: "AndroidManifest.xml",
Dave Mankoff9179b302020-12-02 11:15:27 -0500142}