Android.bp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. // Sources that have no dependencies that can be used directly downstream of this library
  38. filegroup {
  39. name: "wm_shell_util-sources",
  40. srcs: [
  41. "src/com/android/wm/shell/util/**/*.java",
  42. "src/com/android/wm/shell/common/split/SplitScreenConstants.java"
  43. ],
  44. path: "src",
  45. }
  46. // Aidls which can be used directly downstream of this library
  47. filegroup {
  48. name: "wm_shell-aidls",
  49. srcs: [
  50. "src/**/*.aidl",
  51. ],
  52. path: "src",
  53. }
  54. // TODO(b/168581922) protologtool do not support kotlin(*.kt)
  55. filegroup {
  56. name: "wm_shell-sources-kt",
  57. srcs: [
  58. "src/**/*.kt",
  59. ],
  60. path: "src",
  61. }
  62. genrule {
  63. name: "wm_shell_protolog_src",
  64. srcs: [
  65. ":wm_shell_protolog-groups",
  66. ":wm_shell-sources",
  67. ],
  68. tools: ["protologtool"],
  69. cmd: "$(location protologtool) transform-protolog-calls " +
  70. "--protolog-class com.android.internal.protolog.common.ProtoLog " +
  71. "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " +
  72. "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " +
  73. "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
  74. "--loggroups-jar $(location :wm_shell_protolog-groups) " +
  75. "--output-srcjar $(out) " +
  76. "$(locations :wm_shell-sources)",
  77. out: ["wm_shell_protolog.srcjar"],
  78. }
  79. genrule {
  80. name: "generate-wm_shell_protolog.json",
  81. srcs: [
  82. ":wm_shell_protolog-groups",
  83. ":wm_shell-sources",
  84. ],
  85. tools: ["protologtool"],
  86. cmd: "$(location protologtool) generate-viewer-config " +
  87. "--protolog-class com.android.internal.protolog.common.ProtoLog " +
  88. "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
  89. "--loggroups-jar $(location :wm_shell_protolog-groups) " +
  90. "--viewer-conf $(out) " +
  91. "$(locations :wm_shell-sources)",
  92. out: ["wm_shell_protolog.json"],
  93. }
  94. // End ProtoLog
  95. java_library {
  96. name: "WindowManager-Shell-proto",
  97. srcs: ["proto/*.proto"],
  98. proto: {
  99. type: "nano",
  100. },
  101. }
  102. android_library {
  103. name: "WindowManager-Shell",
  104. srcs: [
  105. ":wm_shell_protolog_src",
  106. // TODO(b/168581922) protologtool do not support kotlin(*.kt)
  107. ":wm_shell-sources-kt",
  108. ":wm_shell-aidls",
  109. ],
  110. resource_dirs: [
  111. "res",
  112. ],
  113. java_resources: [
  114. ":generate-wm_shell_protolog.json"
  115. ],
  116. static_libs: [
  117. "androidx.appcompat_appcompat",
  118. "androidx.arch.core_core-runtime",
  119. "androidx.dynamicanimation_dynamicanimation",
  120. "androidx.recyclerview_recyclerview",
  121. "kotlinx-coroutines-android",
  122. "kotlinx-coroutines-core",
  123. "iconloader_base",
  124. "protolog-lib",
  125. "WindowManager-Shell-proto",
  126. "dagger2",
  127. "jsr330",
  128. ],
  129. kotlincflags: ["-Xjvm-default=enable"],
  130. manifest: "AndroidManifest.xml",
  131. plugins: ["dagger2-compiler"],
  132. }