Warn about java res collisions between app and lib

Currently, when an app or dynamic-feature module has a java
resource or .so file with the same name as a java resource or .so file
from one of its dependencies,
AGP automatically chooses the version of the file from the app or
dynamic-feature module and ignores the file from the dependency.
This can lead to unexpected behavior or errors at runtime, so eventually
this should result in an error.

This CL adds a warning for this case, which will be converted to an
error in a future version of AGP.

Bug: 141758241
Test: JavaResPackagingTest, NativeSoPackagingTest
Change-Id: Id23de956747593e6c5a9c6d6f0175a612d0f53b5
3 files changed
tree: 8127f54b625e43aef500949ee344c340f152145e
  1. .idea/
  2. annotations/
  3. apkparser/
  4. app-inspection/
  5. apps/
  6. aspects_agent/
  7. bazel/
  8. build-system/
  9. chunkio/
  10. chunkio-processor/
  11. common/
  12. ddmlib/
  13. debug/
  14. deploy/
  15. device_validator/
  16. draw9patch/
  17. dynamic-layout-inspector/
  18. echo-sample/
  19. experimental/
  20. external-annotations/
  21. fakeadbserver/
  22. fakeandroid/
  23. files/
  24. flags/
  25. jaxb-inheritance-plugin/
  26. jobb/
  27. layoutinspector/
  28. layoutlib-api/
  29. legacy/
  30. lint/
  31. misc/
  32. ninepatch/
  33. perf-logger/
  34. perflib/
  35. pixelprobe/
  36. profiler/
  37. repository/
  38. sdk-common/
  39. sdklib/
  40. signflinger/
  41. templates/
  42. testing-infrastructure/
  43. testutils/
  44. third_party/
  45. tracer/
  46. transport/
  47. usb-devices/
  48. vector-drawable-tool/
  49. wizard/
  50. zipflinger/
  51. .gitignore
  52. adt.iml
  53. BUILD.bazel
  54. build.gradle
  55. changes.txt
  56. contributing.md
  57. navbar.md
  58. PREUPLOAD.cfg
  59. README.md
  60. source.md
  61. 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-master-dev (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