Use framework-res keep rules for system_server
The framework-res manifest defines a number of services implemented in system_server. These required manual keep rules to prevent shrinking, but now we can use the aapt-generated keep rules to achieve the same result, without the maintenance burden. A follow-up change will trim the existing keep rules to remove redundant keeps, and plumb the same keep rules to other targets that define system_server jars. Bug: 272495195 Test: m + validate no net change to services.jar Change-Id: Ibbb3ba47417ecadfae92764933761c4339ca6b35
This commit is contained in:
@@ -59,7 +59,12 @@ system_optimized_java_defaults {
|
||||
optimize: false,
|
||||
shrink: true,
|
||||
ignore_warnings: false,
|
||||
proguard_flags_files: ["proguard.flags"],
|
||||
proguard_flags_files: [
|
||||
"proguard.flags",
|
||||
// Ensure classes referenced in the framework-res manifest
|
||||
// and implemented in system_server are kept.
|
||||
":framework-res{.aapt.proguardOptionsFile}",
|
||||
],
|
||||
},
|
||||
// Note: Optimizations are disabled by default if unspecified in
|
||||
// the java_library rule.
|
||||
|
||||
Reference in New Issue
Block a user