Merge "Further refine VisibleForTesting rules" am: 7e559f9c24
am: 9976b4bbe6
Original change: https://android-review.googlesource.com/c/platform/build/+/2415814 Change-Id: Id4f0d8eab83cb192e890e5bf8886d9b40c0e4613 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
25a295e208
1 changed files with 11 additions and 6 deletions
|
@ -9,14 +9,19 @@
|
|||
# Add this flag in your package's own configuration if it's needed.
|
||||
#-flattenpackagehierarchy
|
||||
|
||||
# Keep classes and methods that have @VisibleForTesting annotations, except in
|
||||
# intermediate libraries that export those annotations (e.g., androidx, guava).
|
||||
# This avoids keeping library-specific test code that isn't actually needed
|
||||
# for platform testing.
|
||||
# Keep classes and members with the platform-defined @VisibleForTesting annotation.
|
||||
-keep @com.android.internal.annotations.VisibleForTesting class *
|
||||
-keepclassmembers class * {
|
||||
@com.android.internal.annotations.VisibleForTesting *;
|
||||
}
|
||||
|
||||
# Keep classes and members with non-platform @VisibleForTesting annotations, but
|
||||
# only within platform-defined packages. This avoids keeping external, library-specific
|
||||
# test code that isn't actually needed for platform testing.
|
||||
# TODO(b/239961360): Migrate away from androidx.annotation.VisibleForTesting
|
||||
# and com.google.common.annotations.VisibleForTesting use in platform code.
|
||||
-keep @**.VisibleForTesting class !androidx.**,!com.google.common.**,*
|
||||
-keepclassmembers class !androidx.**,!com.google.common.**,* {
|
||||
-keep @**.VisibleForTesting class android.**,com.android.**,com.google.android.**
|
||||
-keepclassmembers class android.**,com.android.**,com.google.android.** {
|
||||
@**.VisibleForTesting *;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue