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