Merge "Enable optimizer on service-connectivity"
This commit is contained in:
commit
b1c08a00fc
2 changed files with 23 additions and 0 deletions
|
|
@ -216,6 +216,11 @@ java_library {
|
|||
apex_available: [
|
||||
"com.android.tethering",
|
||||
],
|
||||
optimize: {
|
||||
enabled: true,
|
||||
shrink: true,
|
||||
proguard_flags_files: ["proguard.flags"],
|
||||
},
|
||||
lint: { strict_updatability_linting: true },
|
||||
}
|
||||
|
||||
|
|
|
|||
18
service/proguard.flags
Normal file
18
service/proguard.flags
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Make sure proguard keeps all connectivity classes
|
||||
# TODO: instead of keeping everything, consider listing only "entry points"
|
||||
# (service loader, JNI registered methods, etc) and letting the optimizer do its job
|
||||
-keep class android.net.** { *; }
|
||||
-keep class com.android.connectivity.** { *; }
|
||||
-keep class com.android.net.** { *; }
|
||||
-keep class !com.android.server.nearby.**,com.android.server.** { *; }
|
||||
|
||||
# Prevent proguard from stripping out any nearby-service and fast-pair-lite-protos fields.
|
||||
-keep class com.android.server.nearby.NearbyService { *; }
|
||||
-keep class com.android.server.nearby.service.proto { *; }
|
||||
|
||||
# The lite proto runtime uses reflection to access fields based on the names in
|
||||
# the schema, keep all the fields.
|
||||
# This replicates the base proguard rule used by the build by default
|
||||
# (proguard_basic_keeps.flags), but needs to be specified here because the
|
||||
# com.google.protobuf package is jarjared to the below package.
|
||||
-keepclassmembers class * extends com.android.connectivity.com.google.protobuf.MessageLite { <fields>; }
|
||||
Loading…
Reference in a new issue