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"], |
| 22 | } |
| 23 | |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 24 | // Begin ProtoLog |
| 25 | java_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 | |
| 33 | filegroup { |
| 34 | name: "wm_shell-sources", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 35 | srcs: [ |
| 36 | "src/**/*.java", |
| 37 | ], |
| 38 | path: "src", |
| 39 | } |
| 40 | |
Winson Chung | 92a8e1a | 2021-10-16 21:44:25 -0700 | [diff] [blame] | 41 | // Sources that have no dependencies that can be used directly downstream of this library |
Winson Chung | 2b72add | 2021-02-02 23:27:07 -0800 | [diff] [blame] | 42 | filegroup { |
Evan Rosky | 14ea8c6 | 2021-09-30 17:28:35 -0700 | [diff] [blame] | 43 | name: "wm_shell_util-sources", |
| 44 | srcs: [ |
| 45 | "src/com/android/wm/shell/util/**/*.java", |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 46 | "src/com/android/wm/shell/common/split/SplitScreenConstants.java", |
Winson Chung | c03010f | 2022-09-26 21:46:25 +0000 | [diff] [blame] | 47 | "src/com/android/wm/shell/sysui/ShellSharedConstants.java", |
Pat Manning | f7d61d7 | 2022-09-07 17:33:41 +0100 | [diff] [blame] | 48 | "src/com/android/wm/shell/common/TransactionPool.java", |
| 49 | "src/com/android/wm/shell/animation/Interpolators.java", |
Hongwei Wang | be31a56 | 2023-01-26 13:10:28 -0800 | [diff] [blame^] | 50 | "src/com/android/wm/shell/pip/PipContentOverlay.java", |
Pat Manning | f7d61d7 | 2022-09-07 17:33:41 +0100 | [diff] [blame] | 51 | "src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.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: [ |
| 77 | ":wm_shell_protolog-groups", |
| 78 | ":wm_shell-sources", |
| 79 | ], |
| 80 | tools: ["protologtool"], |
| 81 | cmd: "$(location protologtool) transform-protolog-calls " + |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 82 | "--protolog-class com.android.internal.protolog.common.ProtoLog " + |
| 83 | "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " + |
| 84 | "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " + |
| 85 | "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " + |
| 86 | "--loggroups-jar $(location :wm_shell_protolog-groups) " + |
| 87 | "--output-srcjar $(out) " + |
| 88 | "$(locations :wm_shell-sources)", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 89 | out: ["wm_shell_protolog.srcjar"], |
| 90 | } |
| 91 | |
| 92 | genrule { |
| 93 | name: "generate-wm_shell_protolog.json", |
| 94 | srcs: [ |
| 95 | ":wm_shell_protolog-groups", |
| 96 | ":wm_shell-sources", |
| 97 | ], |
| 98 | tools: ["protologtool"], |
| 99 | cmd: "$(location protologtool) generate-viewer-config " + |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 100 | "--protolog-class com.android.internal.protolog.common.ProtoLog " + |
| 101 | "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " + |
| 102 | "--loggroups-jar $(location :wm_shell_protolog-groups) " + |
| 103 | "--viewer-conf $(out) " + |
| 104 | "$(locations :wm_shell-sources)", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 105 | out: ["wm_shell_protolog.json"], |
| 106 | } |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 107 | |
Hongwei Wang | 2b227ee | 2022-08-19 09:38:18 -0700 | [diff] [blame] | 108 | genrule { |
| 109 | name: "protolog.json.gz", |
| 110 | srcs: [":generate-wm_shell_protolog.json"], |
| 111 | out: ["wmshell.protolog.json.gz"], |
| 112 | cmd: "$(location minigzip) -c < $(in) > $(out)", |
| 113 | tools: ["minigzip"], |
| 114 | } |
| 115 | |
| 116 | prebuilt_etc { |
| 117 | name: "wmshell.protolog.json.gz", |
| 118 | system_ext_specific: true, |
| 119 | src: ":protolog.json.gz", |
| 120 | filename_from_src: true, |
| 121 | } |
| 122 | |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 123 | // End ProtoLog |
| 124 | |
Winson Chung | eb1aa3d | 2020-08-25 19:02:29 -0700 | [diff] [blame] | 125 | java_library { |
| 126 | name: "WindowManager-Shell-proto", |
| 127 | |
| 128 | srcs: ["proto/*.proto"], |
| 129 | |
| 130 | proto: { |
| 131 | type: "nano", |
| 132 | }, |
| 133 | } |
| 134 | |
Winson Chung | 10a9b4b | 2019-12-18 10:01:36 -0800 | [diff] [blame] | 135 | android_library { |
| 136 | name: "WindowManager-Shell", |
| 137 | srcs: [ |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 138 | ":wm_shell_protolog_src", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 139 | // TODO(b/168581922) protologtool do not support kotlin(*.kt) |
| 140 | ":wm_shell-sources-kt", |
Winson Chung | 2b72add | 2021-02-02 23:27:07 -0800 | [diff] [blame] | 141 | ":wm_shell-aidls", |
Winson Chung | 10a9b4b | 2019-12-18 10:01:36 -0800 | [diff] [blame] | 142 | ], |
| 143 | resource_dirs: [ |
| 144 | "res", |
| 145 | ], |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 146 | static_libs: [ |
Tony Huang | eb01a25 | 2020-10-27 11:37:11 +0800 | [diff] [blame] | 147 | "androidx.appcompat_appcompat", |
| 148 | "androidx.arch.core_core-runtime", |
Ats Jenk | f33f1da | 2021-12-14 14:10:20 -0800 | [diff] [blame] | 149 | "androidx-constraintlayout_constraintlayout", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 150 | "androidx.dynamicanimation_dynamicanimation", |
Sunny Goyal | dcdee33 | 2021-03-30 09:42:19 -0700 | [diff] [blame] | 151 | "androidx.recyclerview_recyclerview", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 152 | "kotlinx-coroutines-android", |
| 153 | "kotlinx-coroutines-core", |
Tony Huang | eb01a25 | 2020-10-27 11:37:11 +0800 | [diff] [blame] | 154 | "iconloader_base", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 155 | "protolog-lib", |
Winson Chung | eb1aa3d | 2020-08-25 19:02:29 -0700 | [diff] [blame] | 156 | "WindowManager-Shell-proto", |
Winson Chung | ca5598d | 2021-11-04 19:22:25 -0700 | [diff] [blame] | 157 | "dagger2", |
Sunny Goyal | dcdee33 | 2021-03-30 09:42:19 -0700 | [diff] [blame] | 158 | "jsr330", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 159 | ], |
Colin Cross | 4a26fe8 | 2022-03-17 13:14:55 -0700 | [diff] [blame] | 160 | libs: [ |
| 161 | // Soong fails to automatically add this dependency because all the |
| 162 | // *.kt sources are inside a filegroup. |
| 163 | "kotlin-annotations", |
| 164 | ], |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 165 | kotlincflags: ["-Xjvm-default=enable"], |
Winson Chung | 10a9b4b | 2019-12-18 10:01:36 -0800 | [diff] [blame] | 166 | manifest: "AndroidManifest.xml", |
Winson Chung | ca5598d | 2021-11-04 19:22:25 -0700 | [diff] [blame] | 167 | plugins: ["dagger2-compiler"], |
Dave Mankoff | 9179b30 | 2020-12-02 11:15:27 -0500 | [diff] [blame] | 168 | } |