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 | 2b72add | 2021-02-02 23:27:07 -0800 | [diff] [blame] | 41 | filegroup { |
Evan Rosky | 14ea8c6 | 2021-09-30 17:28:35 -0700 | [diff] [blame^] | 42 | name: "wm_shell_util-sources", |
| 43 | srcs: [ |
| 44 | "src/com/android/wm/shell/util/**/*.java", |
| 45 | ], |
| 46 | path: "src", |
| 47 | } |
| 48 | |
| 49 | filegroup { |
Winson Chung | 2b72add | 2021-02-02 23:27:07 -0800 | [diff] [blame] | 50 | name: "wm_shell-aidls", |
| 51 | srcs: [ |
| 52 | "src/**/*.aidl", |
| 53 | ], |
| 54 | path: "src", |
| 55 | } |
| 56 | |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 57 | // TODO(b/168581922) protologtool do not support kotlin(*.kt) |
| 58 | filegroup { |
| 59 | name: "wm_shell-sources-kt", |
| 60 | srcs: [ |
| 61 | "src/**/*.kt", |
| 62 | ], |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 63 | path: "src", |
| 64 | } |
| 65 | |
| 66 | genrule { |
| 67 | name: "wm_shell_protolog_src", |
| 68 | srcs: [ |
| 69 | ":wm_shell_protolog-groups", |
| 70 | ":wm_shell-sources", |
| 71 | ], |
| 72 | tools: ["protologtool"], |
| 73 | cmd: "$(location protologtool) transform-protolog-calls " + |
Quang Luong | 0c3b94e | 2021-03-19 16:55:23 +0000 | [diff] [blame] | 74 | "--protolog-class com.android.internal.protolog.common.ProtoLog " + |
| 75 | "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " + |
| 76 | "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " + |
| 77 | "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " + |
| 78 | "--loggroups-jar $(location :wm_shell_protolog-groups) " + |
| 79 | "--output-srcjar $(out) " + |
| 80 | "$(locations :wm_shell-sources)", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 81 | out: ["wm_shell_protolog.srcjar"], |
| 82 | } |
| 83 | |
| 84 | genrule { |
| 85 | name: "generate-wm_shell_protolog.json", |
| 86 | srcs: [ |
| 87 | ":wm_shell_protolog-groups", |
| 88 | ":wm_shell-sources", |
| 89 | ], |
| 90 | tools: ["protologtool"], |
| 91 | cmd: "$(location protologtool) generate-viewer-config " + |
Quang Luong | 0c3b94e | 2021-03-19 16:55:23 +0000 | [diff] [blame] | 92 | "--protolog-class com.android.internal.protolog.common.ProtoLog " + |
| 93 | "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " + |
| 94 | "--loggroups-jar $(location :wm_shell_protolog-groups) " + |
| 95 | "--viewer-conf $(out) " + |
| 96 | "$(locations :wm_shell-sources)", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 97 | out: ["wm_shell_protolog.json"], |
| 98 | } |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 99 | // End ProtoLog |
| 100 | |
Winson Chung | eb1aa3d | 2020-08-25 19:02:29 -0700 | [diff] [blame] | 101 | java_library { |
| 102 | name: "WindowManager-Shell-proto", |
| 103 | |
| 104 | srcs: ["proto/*.proto"], |
| 105 | |
| 106 | proto: { |
| 107 | type: "nano", |
| 108 | }, |
| 109 | } |
| 110 | |
Winson Chung | 10a9b4b | 2019-12-18 10:01:36 -0800 | [diff] [blame] | 111 | android_library { |
| 112 | name: "WindowManager-Shell", |
| 113 | srcs: [ |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 114 | ":wm_shell_protolog_src", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 115 | // TODO(b/168581922) protologtool do not support kotlin(*.kt) |
| 116 | ":wm_shell-sources-kt", |
Winson Chung | 2b72add | 2021-02-02 23:27:07 -0800 | [diff] [blame] | 117 | ":wm_shell-aidls", |
Winson Chung | 10a9b4b | 2019-12-18 10:01:36 -0800 | [diff] [blame] | 118 | ], |
| 119 | resource_dirs: [ |
| 120 | "res", |
| 121 | ], |
Winson Chung | 9169b37 | 2021-02-12 00:29:24 -0800 | [diff] [blame] | 122 | java_resources: [ |
Quang Luong | 0c3b94e | 2021-03-19 16:55:23 +0000 | [diff] [blame] | 123 | ":generate-wm_shell_protolog.json" |
Winson Chung | 9169b37 | 2021-02-12 00:29:24 -0800 | [diff] [blame] | 124 | ], |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 125 | static_libs: [ |
Tony Huang | eb01a25 | 2020-10-27 11:37:11 +0800 | [diff] [blame] | 126 | "androidx.appcompat_appcompat", |
| 127 | "androidx.arch.core_core-runtime", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 128 | "androidx.dynamicanimation_dynamicanimation", |
Sunny Goyal | dcdee33 | 2021-03-30 09:42:19 -0700 | [diff] [blame] | 129 | "androidx.recyclerview_recyclerview", |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 130 | "kotlinx-coroutines-android", |
| 131 | "kotlinx-coroutines-core", |
Tony Huang | eb01a25 | 2020-10-27 11:37:11 +0800 | [diff] [blame] | 132 | "iconloader_base", |
Winson Chung | 94132e1 | 2020-11-09 19:42:12 -0800 | [diff] [blame] | 133 | "jsr330", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 134 | "protolog-lib", |
Winson Chung | eb1aa3d | 2020-08-25 19:02:29 -0700 | [diff] [blame] | 135 | "WindowManager-Shell-proto", |
Sunny Goyal | dcdee33 | 2021-03-30 09:42:19 -0700 | [diff] [blame] | 136 | "jsr330", |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 137 | ], |
Bill Lin | 2b3bd57 | 2020-09-03 23:22:14 +0800 | [diff] [blame] | 138 | kotlincflags: ["-Xjvm-default=enable"], |
Winson Chung | 10a9b4b | 2019-12-18 10:01:36 -0800 | [diff] [blame] | 139 | manifest: "AndroidManifest.xml", |
Dave Mankoff | 9179b30 | 2020-12-02 11:15:27 -0500 | [diff] [blame] | 140 | } |