Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ad565d0 authored by Jared Duke's avatar Jared Duke
Browse files

Trace downstream references when optimizing services.jar

Add a hook to trace references from PRODUCT_SYSTEM_SERVER_JARS
that depend on the services.jar. This ensures that services.jar keeps
such references during optimization, avoiding the need to manually
specify and update associated keep rules.

A follow-up change will remove existing hardcoded rules for certain
devices that are no longer necessary.

Bug: 212737576
Test: m + presubmit + inspect proguard_configuration for services.jar
Flag: EXEMPT build refactor
Change-Id: Idab5e6ba282c6178cff52a8cf30dda6f2a541962
parent 6e8854b2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -70,6 +70,10 @@ system_optimized_java_defaults {
                    // and implemented in system_server are kept.
                    ":framework-res{.aapt.proguardOptionsFile}",
                ],
                trace_references_from: select(soong_config_variable("ANDROID", "system_server_trace_refs"), {
                    any @ trace_refs: trace_refs,
                    default: [],
                }),
            },
            conditions_default: {
                optimize: {