Add protolog config as java resource
- No longer need the checked in version, this just adds the generated viewer config as a java resource - Disabling logs by default Bug: 168497382 Test: adb shell wm logging enable-text WM_SHELL_TASK_ORG Change-Id: Idc5f423dfc24b455de833e7f3f76e9e6db9ceb47
This commit is contained in:
@@ -71,27 +71,6 @@ genrule {
|
||||
"$(locations :wm_shell-sources)",
|
||||
out: ["wm_shell_protolog.json"],
|
||||
}
|
||||
|
||||
filegroup {
|
||||
name: "wm_shell_protolog.json",
|
||||
srcs: ["res/raw/wm_shell_protolog.json"],
|
||||
}
|
||||
|
||||
genrule {
|
||||
name: "checked-wm_shell_protolog.json",
|
||||
srcs: [
|
||||
":generate-wm_shell_protolog.json",
|
||||
":wm_shell_protolog.json",
|
||||
],
|
||||
cmd: "cp $(location :generate-wm_shell_protolog.json) $(out) && " +
|
||||
"{ ! (diff $(out) $(location :wm_shell_protolog.json) | grep -q '^<') || " +
|
||||
"{ echo -e '\\n\\n################################################################\\n#\\n" +
|
||||
"# ERROR: ProtoLog viewer config is stale. To update it, run:\\n#\\n" +
|
||||
"# cp $(location :generate-wm_shell_protolog.json) " +
|
||||
"$(location :wm_shell_protolog.json)\\n#\\n" +
|
||||
"################################################################\\n\\n' >&2 && false; } }",
|
||||
out: ["wm_shell_protolog.json"],
|
||||
}
|
||||
// End ProtoLog
|
||||
|
||||
java_library {
|
||||
@@ -115,6 +94,9 @@ android_library {
|
||||
resource_dirs: [
|
||||
"res",
|
||||
],
|
||||
java_resources: [
|
||||
":generate-wm_shell_protolog.json"
|
||||
],
|
||||
static_libs: [
|
||||
"androidx.appcompat_appcompat",
|
||||
"androidx.arch.core_core-runtime",
|
||||
|
||||
Reference in New Issue
Block a user