Android.bp 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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/TestUtil.java",
  45. "src/com/android/launcher3/util/Wait.java",
  46. "src/com/android/launcher3/util/WidgetUtils.java",
  47. "src/com/android/launcher3/util/rule/FailureWatcher.java",
  48. "src/com/android/launcher3/util/rule/LauncherActivityRule.java",
  49. "src/com/android/launcher3/util/rule/SamplerRule.java",
  50. "src/com/android/launcher3/util/rule/ScreenRecordRule.java",
  51. "src/com/android/launcher3/util/rule/ShellCommandRule.java",
  52. "src/com/android/launcher3/util/rule/SimpleActivityRule.java",
  53. "src/com/android/launcher3/util/rule/TestStabilityRule.java",
  54. "src/com/android/launcher3/util/rule/TISBindRule.java",
  55. "src/com/android/launcher3/testcomponent/BaseTestingActivity.java",
  56. "src/com/android/launcher3/testcomponent/OtherBaseTestingActivity.java",
  57. "src/com/android/launcher3/testcomponent/CustomShortcutConfigActivity.java",
  58. "src/com/android/launcher3/testcomponent/TestCommandReceiver.java",
  59. "src/com/android/launcher3/testcomponent/TestLauncherActivity.java",
  60. "src/com/android/launcher3/testcomponent/ImeTestActivity.java",
  61. ],
  62. }
  63. // Library with all the dependencies for building quickstep
  64. android_library {
  65. name: "Launcher3TestLib",
  66. srcs: [ ],
  67. resource_dirs: ["res"],
  68. static_libs: [
  69. "launcher-aosp-tapl",
  70. "androidx.test.core",
  71. "androidx.test.runner",
  72. "androidx.test.rules",
  73. "androidx.test.ext.junit",
  74. "androidx.test.espresso.core",
  75. "androidx.test.espresso.contrib",
  76. "androidx.test.espresso.intents",
  77. "androidx.test.uiautomator_uiautomator",
  78. "mockito-target-inline-minus-junit4",
  79. "launcher_log_protos_lite",
  80. "truth-prebuilt",
  81. "platform-test-rules",
  82. ],
  83. manifest: "AndroidManifest-common.xml",
  84. platform_apis: true,
  85. }
  86. android_library {
  87. name: "Launcher3TestResources",
  88. resource_dirs: ["res"],
  89. }
  90. android_test {
  91. name: "Launcher3Tests",
  92. srcs: [
  93. ":launcher-tests-src",
  94. ":launcher-non-quickstep-tests-src",
  95. ],
  96. static_libs: ["Launcher3TestLib"],
  97. libs: [
  98. "android.test.base",
  99. "android.test.runner",
  100. "android.test.mock",
  101. ],
  102. jni_libs: [
  103. "libdexmakerjvmtiagent",
  104. "libstaticjvmtiagent",
  105. ],
  106. use_embedded_native_libs: false,
  107. compile_multilib: "both",
  108. instrumentation_for: "Launcher3",
  109. manifest: "AndroidManifest.xml",
  110. platform_apis: true,
  111. test_config: "Launcher3Tests.xml",
  112. data: [":Launcher3"],
  113. test_suites: ["general-tests"],
  114. }
  115. // Shared between tests and launcher
  116. android_library {
  117. name: "launcher-testing-shared",
  118. srcs: [
  119. "shared/com/android/launcher3/testing/shared/**/*.java"
  120. ],
  121. resource_dirs: [ ],
  122. manifest: "shared/AndroidManifest.xml",
  123. sdk_version: "current",
  124. min_sdk_version: min_launcher3_sdk_version,
  125. }