Merge "build: add a few proguard rules [1/3]" into main am: 2b46f4d199

Original change: https://android-review.googlesource.com/c/platform/build/+/2815690

Change-Id: I7a7241c8f4f0390b2fe8f2e892bc0bbb05e2be5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-11-08 23:26:12 +00:00
committed by Automerger Merge Worker
2 changed files with 20 additions and 0 deletions

View File

@@ -61,3 +61,4 @@
}
-include proguard_basic_keeps.flags
-include proguard/kotlin.flags

View File

@@ -0,0 +1,19 @@
# 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.
-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;
}