Android.bp 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. package {
  15. // See: http://go/android-license-faq
  16. // A large-scale-change added 'default_applicable_licenses' to import
  17. // all of the 'license_kinds' from "frameworks_base_license"
  18. // to get the below license kinds:
  19. // SPDX-license-identifier-Apache-2.0
  20. default_applicable_licenses: ["frameworks_base_license"],
  21. }
  22. // Begin ProtoLog
  23. java_library {
  24. name: "wm_shell_protolog-groups",
  25. srcs: [
  26. "src/com/android/wm/shell/protolog/ShellProtoLogGroup.java",
  27. ":protolog-common-src",
  28. ],
  29. }
  30. filegroup {
  31. name: "wm_shell-sources",
  32. srcs: [
  33. "src/**/*.java",
  34. ],
  35. path: "src",
  36. }
  37. filegroup {
  38. name: "wm_shell-aidls",
  39. srcs: [
  40. "src/**/*.aidl",
  41. ],
  42. path: "src",
  43. }
  44. // TODO(b/168581922) protologtool do not support kotlin(*.kt)
  45. filegroup {
  46. name: "wm_shell-sources-kt",
  47. srcs: [
  48. "src/**/*.kt",
  49. ],
  50. path: "src",
  51. }
  52. genrule {
  53. name: "wm_shell_protolog_src",
  54. srcs: [
  55. ":wm_shell_protolog-groups",
  56. ":wm_shell-sources",
  57. ],
  58. tools: ["protologtool"],
  59. cmd: "$(location protologtool) transform-protolog-calls " +
  60. "--protolog-class com.android.internal.protolog.common.ProtoLog " +
  61. "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " +
  62. "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " +
  63. "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
  64. "--loggroups-jar $(location :wm_shell_protolog-groups) " +
  65. "--output-srcjar $(out) " +
  66. "$(locations :wm_shell-sources)",
  67. out: ["wm_shell_protolog.srcjar"],
  68. }
  69. genrule {
  70. name: "generate-wm_shell_protolog.json",
  71. srcs: [
  72. ":wm_shell_protolog-groups",
  73. ":wm_shell-sources",
  74. ],
  75. tools: ["protologtool"],
  76. cmd: "$(location protologtool) generate-viewer-config " +
  77. "--protolog-class com.android.internal.protolog.common.ProtoLog " +
  78. "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
  79. "--loggroups-jar $(location :wm_shell_protolog-groups) " +
  80. "--viewer-conf $(out) " +
  81. "$(locations :wm_shell-sources)",
  82. out: ["wm_shell_protolog.json"],
  83. }
  84. // End ProtoLog
  85. java_library {
  86. name: "WindowManager-Shell-proto",
  87. srcs: ["proto/*.proto"],
  88. proto: {
  89. type: "nano",
  90. },
  91. }
  92. android_library {
  93. name: "WindowManager-Shell",
  94. srcs: [
  95. ":wm_shell_protolog_src",
  96. // TODO(b/168581922) protologtool do not support kotlin(*.kt)
  97. ":wm_shell-sources-kt",
  98. ":wm_shell-aidls",
  99. ],
  100. resource_dirs: [
  101. "res",
  102. ],
  103. java_resources: [
  104. ":generate-wm_shell_protolog.json"
  105. ],
  106. static_libs: [
  107. "androidx.appcompat_appcompat",
  108. "androidx.arch.core_core-runtime",
  109. "androidx.dynamicanimation_dynamicanimation",
  110. "androidx.recyclerview_recyclerview",
  111. "kotlinx-coroutines-android",
  112. "kotlinx-coroutines-core",
  113. "iconloader_base",
  114. "jsr330",
  115. "protolog-lib",
  116. "WindowManager-Shell-proto",
  117. "jsr330",
  118. ],
  119. kotlincflags: ["-Xjvm-default=enable"],
  120. manifest: "AndroidManifest.xml",
  121. }