Lint check: Deprecated Gradle configuration use.

Added new deprecation warning for use of deprecated configurations in
build.gradle. This includes quickfixes.

For example, in a library:

dependencies {
    compile 'androidx.appcompat:appcompat:1.0.0'
}

would trigger warning:

build.gradle:9: Warning: 'compile' is deprecated; replace with either
'api' to maintain current behavior, or 'implementation' to improve build
performance by not sharing this dependency transitively.
[GradleDeprecatedConfiguration]
    compile 'androidx.appcompat:appcompat:1.0.0'
    ~~~~~~~

With proposed fixes:

Fix for build.gradle line 9: Replace 'compile' with 'api':
@@ -9 +9
-     compile 'androidx.appcompat:appcompat:1.0.0'
+     api 'androidx.appcompat:appcompat:1.0.0'
Fix for build.gradle line 9: Replace 'compile' with 'implementation':
@@ -9 +9
-     compile 'androidx.appcompat:appcompat:1.0.0'
+     implementation 'androidx.appcompat:appcompat:1.0.0'

Test: Added new cases to GradleDetectorTest
Bug: 122727153
Change-Id: I7a43372a2be25151b77b176550d08839f4314f6a
8 files changed
tree: 48f2816b57de766d4b201c26a4b8215be7397d7d
  1. .idea/
  2. .vscode/
  3. annotations/
  4. apkparser/
  5. apps/
  6. aspects_agent/
  7. bazel/
  8. build-system/
  9. chunkio/
  10. chunkio-processor/
  11. common/
  12. ddmlib/
  13. deploy/
  14. device_validator/
  15. devicelib/
  16. draw9patch/
  17. fakeadbserver/
  18. fakeandroid/
  19. files/
  20. flags/
  21. instant-run/
  22. instant-run-test-instrumenter/
  23. jaxb-inheritance-plugin/
  24. jobb/
  25. layoutinspector/
  26. layoutlib-api/
  27. legacy/
  28. lint/
  29. misc/
  30. ninepatch/
  31. perf-logger/
  32. perflib/
  33. pixelprobe/
  34. profiler/
  35. repository/
  36. sdk-common/
  37. sdklib/
  38. templates/
  39. testing-infrastructure/
  40. testutils/
  41. third_party/
  42. tracer/
  43. transport/
  44. usb-devices/
  45. vector-drawable-tool/
  46. .gitignore
  47. adt.iml
  48. BUILD.bazel
  49. build.gradle
  50. changes.txt
  51. contributing.md
  52. navbar.md
  53. PREUPLOAD.cfg
  54. README.md
  55. source.md
  56. 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