blob: c7c94246b96a01bf7629165244af1d4175007c0d [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",
49 "src/com/android/wm/shell/animation/Interpolators.java",
Hongwei Wangbe31a562023-01-26 13:10:28 -080050 "src/com/android/wm/shell/pip/PipContentOverlay.java",
Pat Manningf7d61d72022-09-07 17:33:41 +010051 "src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java",
Tony Wickham5d1e0472023-02-21 19:11:46 +000052 "src/com/android/wm/shell/draganddrop/DragAndDropConstants.java",
Evan Rosky14ea8c62021-09-30 17:28:35 -070053 ],
54 path: "src",
55}
56
Winson Chung92a8e1a2021-10-16 21:44:25 -070057// Aidls which can be used directly downstream of this library
Evan Rosky14ea8c62021-09-30 17:28:35 -070058filegroup {
Winson Chung2b72add2021-02-02 23:27:07 -080059 name: "wm_shell-aidls",
60 srcs: [
61 "src/**/*.aidl",
62 ],
63 path: "src",
64}
65
Bill Lin2b3bd572020-09-03 23:22:14 +080066// TODO(b/168581922) protologtool do not support kotlin(*.kt)
67filegroup {
68 name: "wm_shell-sources-kt",
69 srcs: [
70 "src/**/*.kt",
71 ],
Winson Chungb754f522020-08-03 22:17:08 -070072 path: "src",
73}
74
75genrule {
76 name: "wm_shell_protolog_src",
77 srcs: [
78 ":wm_shell_protolog-groups",
79 ":wm_shell-sources",
80 ],
81 tools: ["protologtool"],
82 cmd: "$(location protologtool) transform-protolog-calls " +
Ats Jenkf33f1da2021-12-14 14:10:20 -080083 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
84 "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " +
85 "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " +
86 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
87 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
88 "--output-srcjar $(out) " +
89 "$(locations :wm_shell-sources)",
Winson Chungb754f522020-08-03 22:17:08 -070090 out: ["wm_shell_protolog.srcjar"],
91}
92
93genrule {
94 name: "generate-wm_shell_protolog.json",
95 srcs: [
96 ":wm_shell_protolog-groups",
97 ":wm_shell-sources",
98 ],
99 tools: ["protologtool"],
100 cmd: "$(location protologtool) generate-viewer-config " +
Ats Jenkf33f1da2021-12-14 14:10:20 -0800101 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
102 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
103 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
104 "--viewer-conf $(out) " +
105 "$(locations :wm_shell-sources)",
Winson Chungb754f522020-08-03 22:17:08 -0700106 out: ["wm_shell_protolog.json"],
107}
Ats Jenkf33f1da2021-12-14 14:10:20 -0800108
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700109genrule {
110 name: "protolog.json.gz",
111 srcs: [":generate-wm_shell_protolog.json"],
112 out: ["wmshell.protolog.json.gz"],
113 cmd: "$(location minigzip) -c < $(in) > $(out)",
114 tools: ["minigzip"],
115}
116
117prebuilt_etc {
118 name: "wmshell.protolog.json.gz",
119 system_ext_specific: true,
120 src: ":protolog.json.gz",
121 filename_from_src: true,
122}
123
Winson Chungb754f522020-08-03 22:17:08 -0700124// End ProtoLog
125
Winson Chungeb1aa3d2020-08-25 19:02:29 -0700126java_library {
127 name: "WindowManager-Shell-proto",
128
129 srcs: ["proto/*.proto"],
130
131 proto: {
132 type: "nano",
133 },
134}
135
Winson Chung10a9b4b2019-12-18 10:01:36 -0800136android_library {
137 name: "WindowManager-Shell",
138 srcs: [
Winson Chungb754f522020-08-03 22:17:08 -0700139 ":wm_shell_protolog_src",
Bill Lin2b3bd572020-09-03 23:22:14 +0800140 // TODO(b/168581922) protologtool do not support kotlin(*.kt)
141 ":wm_shell-sources-kt",
Winson Chung2b72add2021-02-02 23:27:07 -0800142 ":wm_shell-aidls",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800143 ],
144 resource_dirs: [
145 "res",
146 ],
Winson Chungb754f522020-08-03 22:17:08 -0700147 static_libs: [
Tony Huangeb01a252020-10-27 11:37:11 +0800148 "androidx.appcompat_appcompat",
149 "androidx.arch.core_core-runtime",
Ats Jenkf33f1da2021-12-14 14:10:20 -0800150 "androidx-constraintlayout_constraintlayout",
Bill Lin2b3bd572020-09-03 23:22:14 +0800151 "androidx.dynamicanimation_dynamicanimation",
Sunny Goyaldcdee332021-03-30 09:42:19 -0700152 "androidx.recyclerview_recyclerview",
Bill Lin2b3bd572020-09-03 23:22:14 +0800153 "kotlinx-coroutines-android",
154 "kotlinx-coroutines-core",
Tony Huangeb01a252020-10-27 11:37:11 +0800155 "iconloader_base",
Winson Chungb754f522020-08-03 22:17:08 -0700156 "protolog-lib",
Winson Chungeb1aa3d2020-08-25 19:02:29 -0700157 "WindowManager-Shell-proto",
Winson Chungca5598d2021-11-04 19:22:25 -0700158 "dagger2",
Sunny Goyaldcdee332021-03-30 09:42:19 -0700159 "jsr330",
Winson Chungb754f522020-08-03 22:17:08 -0700160 ],
Colin Cross4a26fe82022-03-17 13:14:55 -0700161 libs: [
162 // Soong fails to automatically add this dependency because all the
163 // *.kt sources are inside a filegroup.
164 "kotlin-annotations",
165 ],
Bill Lin2b3bd572020-09-03 23:22:14 +0800166 kotlincflags: ["-Xjvm-default=enable"],
Winson Chung10a9b4b2019-12-18 10:01:36 -0800167 manifest: "AndroidManifest.xml",
Winson Chungca5598d2021-11-04 19:22:25 -0700168 plugins: ["dagger2-compiler"],
Dave Mankoff9179b302020-12-02 11:15:27 -0500169}