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