Remi NGUYEN VAN | 47fce47 | 2022-01-14 18:00:11 +0900 | [diff] [blame] | 1 | # Make sure proguard keeps all connectivity classes |
Remi NGUYEN VAN | 2aeb454 | 2022-02-01 02:31:58 +0000 | [diff] [blame] | 2 | # TODO: instead of keeping everything, consider listing only "entry points" |
| 3 | # (service loader, JNI registered methods, etc) and letting the optimizer do its job |
| 4 | -keep class android.net.** { *; } |
Remi NGUYEN VAN | 47fce47 | 2022-01-14 18:00:11 +0900 | [diff] [blame] | 5 | -keep class com.android.connectivity.** { *; } |
| 6 | -keep class com.android.net.** { *; } |
| 7 | -keep class com.android.server.** { *; } |
| 8 | |
Eric Lin | 3d255c1 | 2022-02-09 09:53:02 +0000 | [diff] [blame] | 9 | # Prevent proguard from stripping out any nearby-service and fast-pair-lite-protos fields. |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 10 | # TODO: This could be optimized in the future to only keep the critical |
| 11 | # entry points and then let proguard strip out any unused code within |
Eric Lin | 3d255c1 | 2022-02-09 09:53:02 +0000 | [diff] [blame] | 12 | # the service. "com.android.server.nearby.service.proto" must be kept to prevent proguard |
| 13 | # from stripping out any fast-pair-lite-protos fields. |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 14 | -keep class com.android.server.nearby.** { *; } |
| 15 | |
| 16 | # The lite proto runtime uses reflection to access fields based on the names in |
| 17 | # the schema, keep all the fields. |
| 18 | # This replicates the base proguard rule used by the build by default |
| 19 | # (proguard_basic_keeps.flags), but needs to be specified here because the |
| 20 | # com.google.protobuf package is jarjared to the below package. |
| 21 | -keepclassmembers class * extends com.android.connectivity.com.google.protobuf.MessageLite { <fields>; } |