Stop assuming no main manifest means no overlays

When processing test manifests, code was assuming that if the main
manifest file was absent, it meant that no merging was necessary.
However, it's legal to have a manifest file just in the overlays
(like build-type/product-flavor).
To complicate things further, generated manifests added through
the variant API are overlays to the main manifest.
In case no main manifest file exists in the source folders, elect
the highest priorty overlay (if there are any) as the main
manifest and proceed as usual

Test: Added integration tests
Bug: 341124476
Change-Id: Ida4ecc4db2f0e1d2c8a8c464d795a7713b6f36d3
2 files changed
tree: 253adcd66bd85d7282123ca12b0155b26c14d096
  1. .idea/
  2. adb-proxy/
  3. adblib/
  4. adblib-ddmlibcompatibility/
  5. adblib-tools/
  6. annotations/
  7. apkparser/
  8. app-inspection/
  9. apps/
  10. aspects_agent/
  11. bazel/
  12. build-analyzer/
  13. build-system/
  14. chunkio/
  15. chunkio-processor/
  16. common/
  17. ddmlib/
  18. debugger-tests/
  19. debuggers/
  20. deploy/
  21. device-provisioner/
  22. device_validator/
  23. draw9patch/
  24. dynamic-layout-inspector/
  25. echo-sample/
  26. emulator/
  27. environment-services/
  28. external-annotations/
  29. fakeadbserver/
  30. fakeandroid/
  31. firebase/
  32. flags/
  33. game-tools/
  34. gmaven/
  35. intellij-bazel/
  36. intellij-native/
  37. jaxb-inheritance-plugin/
  38. jdwp-packet/
  39. jdwp-scache/
  40. jdwp-tracer/
  41. jobb/
  42. kotlin-multiplatform-models/
  43. layoutlib-api/
  44. layoutlib-extensions/
  45. leakcanarylib/
  46. legacy/
  47. lint/
  48. manifest-parser/
  49. misc/
  50. mlkit-common/
  51. multipreview-asm/
  52. ninepatch/
  53. owners/
  54. perf-logger/
  55. perflib/
  56. pixelprobe/
  57. preview/
  58. process-monitor/
  59. profgen/
  60. profiler/
  61. repository/
  62. resource-repository/
  63. sdk-common/
  64. sdklib/
  65. signflinger/
  66. standalone-render/
  67. studio-grpc-testutils/
  68. testing-infrastructure/
  69. testutils/
  70. third_party/
  71. threading-agent/
  72. threading-agent-callback/
  73. tracer/
  74. transport/
  75. usb-devices/
  76. utp/
  77. vector-drawable-tool/
  78. wizard/
  79. yourkit-controller/
  80. zipflinger/
  81. .editorconfig
  82. .gitignore
  83. adt.iml
  84. BUILD.bazel
  85. contributing.md
  86. navbar.md
  87. PREUPLOAD.cfg
  88. README.md
  89. source.md
  90. studio.md
README.md

tools/base

This project contains:

  • Common libraries that are shared between any of the IDE (Android Studio), the build system (The Android Gradle Plugin) and SDK components that will be released from studio-main (e.g. the standalone SDK manager). This includes:
    • Instant-run-libraries
    • SDK management libraries
    • The manifest merger
    • Common libraries
    • Common test utilites
  • The build system
  • The new profiler