blob: 54978bd4496dfc92aec6f1128b8e028ac222d372 [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",
Ats Jenkf33f1da2021-12-14 14:10:20 -080046 "src/com/android/wm/shell/common/split/SplitScreenConstants.java",
Winson Chungc03010f2022-09-26 21:46:25 +000047 "src/com/android/wm/shell/sysui/ShellSharedConstants.java",
Pat Manningf7d61d72022-09-07 17:33:41 +010048 "src/com/android/wm/shell/common/TransactionPool.java",
Mady Mellor0c833942022-11-11 15:13:22 -080049 "src/com/android/wm/shell/common/bubbles/*.java",
50 "src/com/android/wm/shell/common/TriangleShape.java",
Pat Manningf7d61d72022-09-07 17:33:41 +010051 "src/com/android/wm/shell/animation/Interpolators.java",
Hongwei Wangbe31a562023-01-26 13:10:28 -080052 "src/com/android/wm/shell/pip/PipContentOverlay.java",
Pat Manningf7d61d72022-09-07 17:33:41 +010053 "src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java",
Tony Wickham5d1e0472023-02-21 19:11:46 +000054 "src/com/android/wm/shell/draganddrop/DragAndDropConstants.java",
Evan Rosky14ea8c62021-09-30 17:28:35 -070055 ],
56 path: "src",
57}
58
Winson Chung92a8e1a2021-10-16 21:44:25 -070059// Aidls which can be used directly downstream of this library
Evan Rosky14ea8c62021-09-30 17:28:35 -070060filegroup {
Winson Chung2b72add2021-02-02 23:27:07 -080061 name: "wm_shell-aidls",
62 srcs: [
63 "src/**/*.aidl",
64 ],
65 path: "src",
66}
67
Bill Lin2b3bd572020-09-03 23:22:14 +080068// TODO(b/168581922) protologtool do not support kotlin(*.kt)
69filegroup {
70 name: "wm_shell-sources-kt",
71 srcs: [
72 "src/**/*.kt",
73 ],
Winson Chungb754f522020-08-03 22:17:08 -070074 path: "src",
75}
76
77genrule {
78 name: "wm_shell_protolog_src",
79 srcs: [
80 ":wm_shell_protolog-groups",
81 ":wm_shell-sources",
82 ],
83 tools: ["protologtool"],
84 cmd: "$(location protologtool) transform-protolog-calls " +
Ats Jenkf33f1da2021-12-14 14:10:20 -080085 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
86 "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " +
87 "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " +
88 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
89 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
90 "--output-srcjar $(out) " +
91 "$(locations :wm_shell-sources)",
Winson Chungb754f522020-08-03 22:17:08 -070092 out: ["wm_shell_protolog.srcjar"],
93}
94
95genrule {
96 name: "generate-wm_shell_protolog.json",
97 srcs: [
98 ":wm_shell_protolog-groups",
99 ":wm_shell-sources",
100 ],
101 tools: ["protologtool"],
102 cmd: "$(location protologtool) generate-viewer-config " +
Ats Jenkf33f1da2021-12-14 14:10:20 -0800103 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
104 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
105 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
106 "--viewer-conf $(out) " +
107 "$(locations :wm_shell-sources)",
Winson Chungb754f522020-08-03 22:17:08 -0700108 out: ["wm_shell_protolog.json"],
109}
Ats Jenkf33f1da2021-12-14 14:10:20 -0800110
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700111genrule {
112 name: "protolog.json.gz",
113 srcs: [":generate-wm_shell_protolog.json"],
114 out: ["wmshell.protolog.json.gz"],
115 cmd: "$(location minigzip) -c < $(in) > $(out)",
116 tools: ["minigzip"],
117}
118
119prebuilt_etc {
120 name: "wmshell.protolog.json.gz",
121 system_ext_specific: true,
122 src: ":protolog.json.gz",
123 filename_from_src: true,
124}
125
Winson Chungb754f522020-08-03 22:17:08 -0700126// End ProtoLog
127
Winson Chungeb1aa3d2020-08-25 19:02:29 -0700128java_library {
129 name: "WindowManager-Shell-proto",
130
131 srcs: ["proto/*.proto"],
132
133 proto: {
134 type: "nano",
135 },
136}
137
Winson Chung10a9b4b2019-12-18 10:01:36 -0800138android_library {
139 name: "WindowManager-Shell",
140 srcs: [
Winson Chungb754f522020-08-03 22:17:08 -0700141 ":wm_shell_protolog_src",
Bill Lin2b3bd572020-09-03 23:22:14 +0800142 // TODO(b/168581922) protologtool do not support kotlin(*.kt)
143 ":wm_shell-sources-kt",
Winson Chung2b72add2021-02-02 23:27:07 -0800144 ":wm_shell-aidls",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800145 ],
146 resource_dirs: [
147 "res",
148 ],
Winson Chungb754f522020-08-03 22:17:08 -0700149 static_libs: [
Tony Huangeb01a252020-10-27 11:37:11 +0800150 "androidx.appcompat_appcompat",
151 "androidx.arch.core_core-runtime",
Ats Jenkf33f1da2021-12-14 14:10:20 -0800152 "androidx-constraintlayout_constraintlayout",
Bill Lin2b3bd572020-09-03 23:22:14 +0800153 "androidx.dynamicanimation_dynamicanimation",
Sunny Goyaldcdee332021-03-30 09:42:19 -0700154 "androidx.recyclerview_recyclerview",
Bill Lin2b3bd572020-09-03 23:22:14 +0800155 "kotlinx-coroutines-android",
156 "kotlinx-coroutines-core",
Tony Huangeb01a252020-10-27 11:37:11 +0800157 "iconloader_base",
Winson Chungb754f522020-08-03 22:17:08 -0700158 "protolog-lib",
Winson Chungeb1aa3d2020-08-25 19:02:29 -0700159 "WindowManager-Shell-proto",
Winson Chungca5598d2021-11-04 19:22:25 -0700160 "dagger2",
Sunny Goyaldcdee332021-03-30 09:42:19 -0700161 "jsr330",
Winson Chungb754f522020-08-03 22:17:08 -0700162 ],
Colin Cross4a26fe82022-03-17 13:14:55 -0700163 libs: [
164 // Soong fails to automatically add this dependency because all the
165 // *.kt sources are inside a filegroup.
166 "kotlin-annotations",
167 ],
Bill Lin2b3bd572020-09-03 23:22:14 +0800168 kotlincflags: ["-Xjvm-default=enable"],
Winson Chung10a9b4b2019-12-18 10:01:36 -0800169 manifest: "AndroidManifest.xml",
Winson Chungca5598d2021-11-04 19:22:25 -0700170 plugins: ["dagger2-compiler"],
Dave Mankoff9179b302020-12-02 11:15:27 -0500171}