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