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