From 32c8a6a43d16dc0ca6adb1a439b316b16e5d3331 Mon Sep 17 00:00:00 2001 From: Jared Duke Date: Wed, 1 May 2024 23:32:26 +0000 Subject: [PATCH] Disable kotlin -checkdiscard rule kotlin-stdlib is included transitively as a library jar by way of androidx.annotations, which means we cannot ensure associated classes are discarded by R8. Disable the related `-checkdiscard` proguard rule until that inclusion is resolved, avoiding spurious warnings in build output. Bug: 302383328 Test: m Flag: NA Change-Id: I7514e6841735e95e1a16d42d6a6e134103ecb108 --- core/proguard/kotlin.flags | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/proguard/kotlin.flags b/core/proguard/kotlin.flags index 70dbaa7e81..ef6bf0e9e3 100644 --- a/core/proguard/kotlin.flags +++ b/core/proguard/kotlin.flags @@ -10,7 +10,9 @@ # Kotlin DebugMetadata has no value in release builds, these two rules, will # allow AppReduce to strip out DebutMetadata. --checkdiscard interface kotlin.coroutines.jvm.internal.DebugMetadata +# TODO(b/302383328): Restore the below checkdiscard after resolving transitive +# inclusion of kotlin-stdlib from androidx.annotation library deps. +# -checkdiscard interface kotlin.coroutines.jvm.internal.DebugMetadata -assumenosideeffects class kotlin.coroutines.jvm.internal.DebugMetadataKt { *** getDebugMetadataAnnotation(...); }