Winson Chung | 10a9b4b | 2019-12-18 10:01:36 -0800 | [diff] [blame] | 1 | // 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 Badour | 8a6a2bc | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 15 | package { |
| 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"], |
Liran Binyamin | 9ded80b | 2024-02-13 10:18:45 -0500 | [diff] [blame] | 22 | default_team: "trendy_team_multitasking_windowing", |
Bob Badour | 8a6a2bc | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 23 | } |
| 24 | |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 25 | // Begin ProtoLog |
| 26 | java_library { |
| 27 | name: "wm_shell_protolog-groups", |
| 28 | srcs: [ |
| 29 | "src/com/android/wm/shell/protolog/ShellProtoLogGroup.java", |
| 30 | ":protolog-common-src", |
| 31 | ], |
| 32 | } |
| 33 | |
| 34 | filegroup { |
| 35 | name: "wm_shell-sources", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 36 | srcs: [ |
| 37 | "src/**/*.java", |
| 38 | ], |
| 39 | path: "src", |
| 40 | } |
| 41 | |
Winson Chung | 92a8e1a | 2021-10-16 21:44:25 -0700 | [diff] [blame] | 42 | // Sources that have no dependencies that can be used directly downstream of this library |
Luca Zuccarini | d6073dc | 2024-01-22 17:06:41 +0000 | [diff] [blame] | 43 | // TODO(b/322791067): move these sources to WindowManager-Shell-shared |
Winson Chung | 2b72add | 2021-02-02 23:27:07 -0800 | [diff] [blame] | 44 | filegroup { |
Evan Rosky | 14ea8c6 | 2021-09-30 17:28:35 -0700 | [diff] [blame] | 45 | name: "wm_shell_util-sources", |
| 46 | srcs: [ |
Ivan Tkachenko | 1ef7e18 | 2023-06-13 18:17:00 +0100 | [diff] [blame] | 47 | "src/com/android/wm/shell/common/bubbles/*.kt", |
| 48 | "src/com/android/wm/shell/common/bubbles/*.java", |
Alina Zaidi | fe70f5f | 2024-05-22 13:24:52 +0000 | [diff] [blame] | 49 | "src/com/android/wm/shell/common/desktopmode/*.kt", |
Hongwei Wang | be31a56 | 2023-01-26 13:10:28 -0800 | [diff] [blame] | 50 | "src/com/android/wm/shell/pip/PipContentOverlay.java", |
Ivan Tkachenko | 1ef7e18 | 2023-06-13 18:17:00 +0100 | [diff] [blame] | 51 | "src/com/android/wm/shell/util/**/*.java", |
Evan Rosky | 14ea8c6 | 2021-09-30 17:28:35 -0700 | [diff] [blame] | 52 | ], |
| 53 | path: "src", |
| 54 | } |
| 55 | |
Winson Chung | 92a8e1a | 2021-10-16 21:44:25 -0700 | [diff] [blame] | 56 | // Aidls which can be used directly downstream of this library |
Evan Rosky | 14ea8c6 | 2021-09-30 17:28:35 -0700 | [diff] [blame] | 57 | filegroup { |
Winson Chung | 2b72add | 2021-02-02 23:27:07 -0800 | [diff] [blame] | 58 | name: "wm_shell-aidls", |
| 59 | srcs: [ |
| 60 | "src/**/*.aidl", |
| 61 | ], |
| 62 | path: "src", |
| 63 | } |
| 64 | |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 65 | // TODO(b/168581922) protologtool do not support kotlin(*.kt) |
| 66 | filegroup { |
| 67 | name: "wm_shell-sources-kt", |
| 68 | srcs: [ |
| 69 | "src/**/*.kt", |
| 70 | ], |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 71 | path: "src", |
| 72 | } |
| 73 | |
| 74 | genrule { |
| 75 | name: "wm_shell_protolog_src", |
| 76 | srcs: [ |
Pablo Gamito | 5fe2c80 | 2024-02-12 12:48:48 +0000 | [diff] [blame] | 77 | ":protolog-impl", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 78 | ":wm_shell_protolog-groups", |
| 79 | ":wm_shell-sources", |
| 80 | ], |
| 81 | tools: ["protologtool"], |
| 82 | cmd: "$(location protologtool) transform-protolog-calls " + |
Pablo Gamito | f89a94d | 2024-06-28 10:40:42 +0000 | [diff] [blame] | 83 | "--protolog-class com.android.internal.protolog.ProtoLog " + |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 84 | "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " + |
| 85 | "--loggroups-jar $(location :wm_shell_protolog-groups) " + |
Pablo Gamito | 5fe2c80 | 2024-02-12 12:48:48 +0000 | [diff] [blame] | 86 | "--viewer-config-file-path /system_ext/etc/wmshell.protolog.pb " + |
| 87 | "--legacy-viewer-config-file-path /system_ext/etc/wmshell.protolog.json.gz " + |
| 88 | "--legacy-output-file-path /data/misc/wmtrace/shell_log.winscope " + |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 89 | "--output-srcjar $(out) " + |
| 90 | "$(locations :wm_shell-sources)", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 91 | out: ["wm_shell_protolog.srcjar"], |
| 92 | } |
| 93 | |
| 94 | genrule { |
| 95 | name: "generate-wm_shell_protolog.json", |
| 96 | srcs: [ |
| 97 | ":wm_shell_protolog-groups", |
| 98 | ":wm_shell-sources", |
| 99 | ], |
| 100 | tools: ["protologtool"], |
| 101 | cmd: "$(location protologtool) generate-viewer-config " + |
Pablo Gamito | f89a94d | 2024-06-28 10:40:42 +0000 | [diff] [blame] | 102 | "--protolog-class com.android.internal.protolog.ProtoLog " + |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 103 | "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " + |
| 104 | "--loggroups-jar $(location :wm_shell_protolog-groups) " + |
Pablo Gamito | 5fe2c80 | 2024-02-12 12:48:48 +0000 | [diff] [blame] | 105 | "--viewer-config-type json " + |
| 106 | "--viewer-config $(out) " + |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 107 | "$(locations :wm_shell-sources)", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 108 | out: ["wm_shell_protolog.json"], |
| 109 | } |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 110 | |
Hongwei Wang | 2b227ee | 2022-08-19 09:38:18 -0700 | [diff] [blame] | 111 | genrule { |
Pablo Gamito | 5fe2c80 | 2024-02-12 12:48:48 +0000 | [diff] [blame] | 112 | name: "gen-wmshell.protolog.pb", |
| 113 | srcs: [ |
| 114 | ":wm_shell_protolog-groups", |
| 115 | ":wm_shell-sources", |
| 116 | ], |
| 117 | tools: ["protologtool"], |
| 118 | cmd: "$(location protologtool) generate-viewer-config " + |
Pablo Gamito | f89a94d | 2024-06-28 10:40:42 +0000 | [diff] [blame] | 119 | "--protolog-class com.android.internal.protolog.ProtoLog " + |
Pablo Gamito | 5fe2c80 | 2024-02-12 12:48:48 +0000 | [diff] [blame] | 120 | "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " + |
| 121 | "--loggroups-jar $(location :wm_shell_protolog-groups) " + |
| 122 | "--viewer-config-type proto " + |
| 123 | "--viewer-config $(out) " + |
| 124 | "$(locations :wm_shell-sources)", |
| 125 | out: ["wmshell.protolog.pb"], |
| 126 | } |
| 127 | |
| 128 | genrule { |
Hongwei Wang | 2b227ee | 2022-08-19 09:38:18 -0700 | [diff] [blame] | 129 | name: "protolog.json.gz", |
| 130 | srcs: [":generate-wm_shell_protolog.json"], |
| 131 | out: ["wmshell.protolog.json.gz"], |
Elliott Hughes | e135c40 | 2023-06-20 16:44:50 -0700 | [diff] [blame] | 132 | cmd: "gzip -c < $(in) > $(out)", |
Hongwei Wang | 2b227ee | 2022-08-19 09:38:18 -0700 | [diff] [blame] | 133 | } |
| 134 | |
| 135 | prebuilt_etc { |
| 136 | name: "wmshell.protolog.json.gz", |
| 137 | system_ext_specific: true, |
| 138 | src: ":protolog.json.gz", |
| 139 | filename_from_src: true, |
| 140 | } |
| 141 | |
Pablo Gamito | 5fe2c80 | 2024-02-12 12:48:48 +0000 | [diff] [blame] | 142 | prebuilt_etc { |
| 143 | name: "wmshell.protolog.pb", |
| 144 | system_ext_specific: true, |
| 145 | src: ":gen-wmshell.protolog.pb", |
| 146 | filename_from_src: true, |
| 147 | } |
| 148 | |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 149 | // End ProtoLog |
| 150 | |
Winson Chung | eb1aa3d | 2020-08-25 19:02:29 -0700 | [diff] [blame] | 151 | java_library { |
| 152 | name: "WindowManager-Shell-proto", |
| 153 | |
| 154 | srcs: ["proto/*.proto"], |
| 155 | |
| 156 | proto: { |
| 157 | type: "nano", |
| 158 | }, |
| 159 | } |
| 160 | |
Shivangi Dubey | a131137c | 2024-07-10 11:14:25 +0000 | [diff] [blame] | 161 | java_library { |
| 162 | name: "WindowManager-Shell-lite-proto", |
| 163 | |
| 164 | srcs: ["src/com/android/wm/shell/desktopmode/education/data/proto/**/*.proto"], |
| 165 | |
| 166 | proto: { |
| 167 | type: "lite", |
| 168 | }, |
| 169 | } |
| 170 | |
Luca Zuccarini | a8aca21fc | 2024-03-15 13:12:50 +0000 | [diff] [blame] | 171 | filegroup { |
| 172 | name: "wm_shell-shared-aidls", |
| 173 | |
| 174 | srcs: [ |
| 175 | "shared/**/*.aidl", |
| 176 | ], |
| 177 | |
| 178 | path: "shared/src", |
| 179 | } |
| 180 | |
Luca Zuccarini | d6073dc | 2024-01-22 17:06:41 +0000 | [diff] [blame] | 181 | java_library { |
| 182 | name: "WindowManager-Shell-shared", |
| 183 | |
Liran Binyamin | 4180ef0 | 2024-03-26 09:56:38 -0400 | [diff] [blame] | 184 | srcs: [ |
| 185 | "shared/**/*.java", |
| 186 | "shared/**/*.kt", |
Luca Zuccarini | a8aca21fc | 2024-03-15 13:12:50 +0000 | [diff] [blame] | 187 | ":wm_shell-shared-aidls", |
Liran Binyamin | 4180ef0 | 2024-03-26 09:56:38 -0400 | [diff] [blame] | 188 | ], |
| 189 | static_libs: [ |
| 190 | "androidx.dynamicanimation_dynamicanimation", |
Luca Zuccarini | 42e7969 | 2024-03-14 15:57:46 +0000 | [diff] [blame] | 191 | "jsr330", |
Liran Binyamin | 4180ef0 | 2024-03-26 09:56:38 -0400 | [diff] [blame] | 192 | ], |
Luca Zuccarini | d6073dc | 2024-01-22 17:06:41 +0000 | [diff] [blame] | 193 | } |
| 194 | |
Alina Zaidi | a4bd41d | 2024-07-05 15:07:26 +0000 | [diff] [blame] | 195 | java_library { |
| 196 | name: "WindowManager-Shell-shared-desktopMode", |
| 197 | |
| 198 | srcs: [ |
| 199 | "shared/**/desktopmode/*.java", |
| 200 | "shared/**/desktopmode/*.kt", |
| 201 | ], |
| 202 | } |
| 203 | |
Winson Chung | 10a9b4b | 2019-12-18 10:01:36 -0800 | [diff] [blame] | 204 | android_library { |
| 205 | name: "WindowManager-Shell", |
| 206 | srcs: [ |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 207 | ":wm_shell_protolog_src", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 208 | // TODO(b/168581922) protologtool do not support kotlin(*.kt) |
| 209 | ":wm_shell-sources-kt", |
Winson Chung | 2b72add | 2021-02-02 23:27:07 -0800 | [diff] [blame] | 210 | ":wm_shell-aidls", |
Winson Chung | 10a9b4b | 2019-12-18 10:01:36 -0800 | [diff] [blame] | 211 | ], |
| 212 | resource_dirs: [ |
| 213 | "res", |
| 214 | ], |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 215 | static_libs: [ |
Tony Huang | eb01a25 | 2020-10-27 11:37:11 +0800 | [diff] [blame] | 216 | "androidx.appcompat_appcompat", |
Jeff DeCew | 86e318e | 2023-07-27 11:00:36 -0400 | [diff] [blame] | 217 | "androidx.core_core-animation", |
Jorge Gil | 4a0c208 | 2023-09-05 16:18:24 +0000 | [diff] [blame] | 218 | "androidx.core_core-ktx", |
Tony Huang | eb01a25 | 2020-10-27 11:37:11 +0800 | [diff] [blame] | 219 | "androidx.arch.core_core-runtime", |
Shivangi Dubey | a131137c | 2024-07-10 11:14:25 +0000 | [diff] [blame] | 220 | "androidx.datastore_datastore", |
Jorge Gil | d45c35d | 2024-06-03 17:33:20 +0000 | [diff] [blame] | 221 | "androidx.compose.material3_material3", |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 222 | "androidx-constraintlayout_constraintlayout", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 223 | "androidx.dynamicanimation_dynamicanimation", |
Sunny Goyal | dcdee33 | 2021-03-30 09:42:19 -0700 | [diff] [blame] | 224 | "androidx.recyclerview_recyclerview", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 225 | "kotlinx-coroutines-android", |
| 226 | "kotlinx-coroutines-core", |
Luca Zuccarini | 1b8ed95 | 2024-04-24 10:17:48 +0000 | [diff] [blame] | 227 | "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib", |
Peter Kalauskas | cd50f53 | 2024-04-02 15:41:14 -0700 | [diff] [blame] | 228 | "//frameworks/libs/systemui:iconloader_base", |
Winson Chung | bfe7f26 | 2023-09-12 20:29:22 +0000 | [diff] [blame] | 229 | "com_android_wm_shell_flags_lib", |
Winson Chung | eb1aa3d | 2020-08-25 19:02:29 -0700 | [diff] [blame] | 230 | "WindowManager-Shell-proto", |
Shivangi Dubey | a131137c | 2024-07-10 11:14:25 +0000 | [diff] [blame] | 231 | "WindowManager-Shell-lite-proto", |
Luca Zuccarini | d6073dc | 2024-01-22 17:06:41 +0000 | [diff] [blame] | 232 | "WindowManager-Shell-shared", |
Pablo Gamito | d19d991 | 2023-11-13 23:32:19 +0000 | [diff] [blame] | 233 | "perfetto_trace_java_protos", |
Winson Chung | ca5598d | 2021-11-04 19:22:25 -0700 | [diff] [blame] | 234 | "dagger2", |
Sunny Goyal | dcdee33 | 2021-03-30 09:42:19 -0700 | [diff] [blame] | 235 | "jsr330", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 236 | ], |
Colin Cross | 4a26fe8 | 2022-03-17 13:14:55 -0700 | [diff] [blame] | 237 | libs: [ |
| 238 | // Soong fails to automatically add this dependency because all the |
| 239 | // *.kt sources are inside a filegroup. |
| 240 | "kotlin-annotations", |
| 241 | ], |
Pablo Gamito | 2750691 | 2024-07-16 15:33:10 +0000 | [diff] [blame] | 242 | required: [ |
| 243 | "wmshell.protolog.json.gz", |
| 244 | "wmshell.protolog.pb", |
| 245 | ], |
Ats Jenk | a402703 | 2024-06-14 13:03:25 -0700 | [diff] [blame] | 246 | flags_packages: [ |
| 247 | "com_android_wm_shell_flags", |
| 248 | ], |
Colin Cross | 6954ea7 | 2023-07-18 10:52:21 -0700 | [diff] [blame] | 249 | kotlincflags: ["-Xjvm-default=all"], |
Winson Chung | 10a9b4b | 2019-12-18 10:01:36 -0800 | [diff] [blame] | 250 | manifest: "AndroidManifest.xml", |
Winson Chung | ca5598d | 2021-11-04 19:22:25 -0700 | [diff] [blame] | 251 | plugins: ["dagger2-compiler"], |
Colin Cross | 085e8c9 | 2023-10-03 16:28:21 -0700 | [diff] [blame] | 252 | use_resource_processor: true, |
Dave Mankoff | 9179b30 | 2020-12-02 11:15:27 -0500 | [diff] [blame] | 253 | } |