Android.bp 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. // Copyright (C) 2021 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. default_applicable_licenses: ["Android-Apache-2.0"],
  17. }
  18. // Source code used for test
  19. filegroup {
  20. name: "launcher-tests-src",
  21. srcs: [
  22. "src/**/*.java",
  23. "src/**/*.kt"
  24. ],
  25. exclude_srcs: [
  26. ":launcher-non-quickstep-tests-src"
  27. ],
  28. }
  29. // Source code used for non-quickstep tests
  30. filegroup {
  31. name: "launcher-non-quickstep-tests-src",
  32. srcs: [
  33. "src/com/android/launcher3/nonquickstep/**/*.java",
  34. "src/com/android/launcher3/nonquickstep/**/*.kt",
  35. ],
  36. }
  37. // Source code used for oop test helpers
  38. filegroup {
  39. name: "launcher-oop-tests-src",
  40. srcs: [
  41. "src/com/android/launcher3/ui/AbstractLauncherUiTest.java",
  42. "src/com/android/launcher3/ui/PortraitLandscapeRunner.java",
  43. "src/com/android/launcher3/ui/TaplTestsLauncher3.java",
  44. "src/com/android/launcher3/util/LauncherLayoutBuilder.java",
  45. "src/com/android/launcher3/util/TestUtil.java",
  46. "src/com/android/launcher3/util/Wait.java",
  47. "src/com/android/launcher3/util/WidgetUtils.java",
  48. "src/com/android/launcher3/util/rule/FailureWatcher.java",
  49. "src/com/android/launcher3/util/rule/LauncherActivityRule.java",
  50. "src/com/android/launcher3/util/rule/ViewCaptureRule.kt",
  51. "src/com/android/launcher3/util/rule/SamplerRule.java",
  52. "src/com/android/launcher3/util/rule/ScreenRecordRule.java",
  53. "src/com/android/launcher3/util/rule/ShellCommandRule.java",
  54. "src/com/android/launcher3/util/rule/SimpleActivityRule.java",
  55. "src/com/android/launcher3/util/rule/TestStabilityRule.java",
  56. "src/com/android/launcher3/util/rule/TISBindRule.java",
  57. "src/com/android/launcher3/testcomponent/BaseTestingActivity.java",
  58. "src/com/android/launcher3/testcomponent/OtherBaseTestingActivity.java",
  59. "src/com/android/launcher3/testcomponent/CustomShortcutConfigActivity.java",
  60. "src/com/android/launcher3/testcomponent/TestCommandReceiver.java",
  61. "src/com/android/launcher3/testcomponent/TestLauncherActivity.java",
  62. "src/com/android/launcher3/testcomponent/ImeTestActivity.java",
  63. ],
  64. }
  65. // Library with all the dependencies for building quickstep
  66. android_library {
  67. name: "Launcher3TestLib",
  68. srcs: [ ],
  69. asset_dirs: ["assets"],
  70. resource_dirs: ["res"],
  71. static_libs: [
  72. "launcher-aosp-tapl",
  73. "androidx.test.core",
  74. "androidx.test.runner",
  75. "androidx.test.rules",
  76. "androidx.test.ext.junit",
  77. "androidx.test.espresso.core",
  78. "androidx.test.espresso.contrib",
  79. "androidx.test.espresso.intents",
  80. "androidx.test.uiautomator_uiautomator",
  81. "mockito-target-inline-minus-junit4",
  82. "launcher_log_protos_lite",
  83. "truth-prebuilt",
  84. "platform-test-rules",
  85. ],
  86. manifest: "AndroidManifest-common.xml",
  87. platform_apis: true,
  88. }
  89. android_library {
  90. name: "Launcher3TestResources",
  91. resource_dirs: ["res"],
  92. }
  93. android_test {
  94. name: "Launcher3Tests",
  95. srcs: [
  96. ":launcher-tests-src",
  97. ":launcher-non-quickstep-tests-src",
  98. ],
  99. static_libs: ["Launcher3TestLib"],
  100. libs: [
  101. "android.test.base",
  102. "android.test.runner",
  103. "android.test.mock",
  104. ],
  105. jni_libs: [
  106. "libdexmakerjvmtiagent",
  107. "libstaticjvmtiagent",
  108. ],
  109. use_embedded_native_libs: false,
  110. compile_multilib: "both",
  111. instrumentation_for: "Launcher3",
  112. manifest: "AndroidManifest.xml",
  113. platform_apis: true,
  114. test_config: "Launcher3Tests.xml",
  115. data: [":Launcher3"],
  116. test_suites: ["general-tests"],
  117. }
  118. // Shared between tests and launcher
  119. android_library {
  120. name: "launcher-testing-shared",
  121. srcs: [
  122. "shared/com/android/launcher3/testing/shared/**/*.java"
  123. ],
  124. resource_dirs: [ ],
  125. manifest: "shared/AndroidManifest.xml",
  126. sdk_version: "current",
  127. min_sdk_version: min_launcher3_sdk_version,
  128. }