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