Files
build/core/proguard/kotlin.flags
Jared Duke 32c8a6a43d 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
2024-05-01 23:34:24 +00:00

22 lines
1.1 KiB
Plaintext

# Ignore missing Kotlin meta-annotations so that Java-only projects can depend
# on projects that happen to be written in Kotlin but do not have a run-time
# dependency on the Kotlin standard library. Note these annotations are RUNTIME
# retention, but we won't need them available in Java-only projects.
-dontwarn kotlin.Metadata
-dontwarn kotlin.annotation.AnnotationRetention
-dontwarn kotlin.annotation.AnnotationTarget
-dontwarn kotlin.annotation.Retention
-dontwarn kotlin.annotation.Target
# Kotlin DebugMetadata has no value in release builds, these two rules, will
# allow AppReduce to strip out DebutMetadata.
# 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(...);
}
-assumevalues class kotlin.coroutines.jvm.internal.DebugMetadataKt {
*** getDebugMetadataAnnotation(...) return null;
}