UnconditionallyKeep



Indicates code which is accessed by references from outside of the application code directly, such as via JNI, reflection, or instantiation from platform framework code.

NOTE: This keep rule is unconditional, meaning that the annotated class, method, or field will always be preserved in the final application even if, for example, the surrounding code is never used.

If reflection or JNI access occurs inside the application, instead prefer the @UsesReflection*** annotations, as they will keep conditionally, rather than unconditionally as this annotation does.

Summary

Public constructors

UnconditionallyKeep(shouldPreserveName: Boolean)
Cmn

Public properties

Boolean

Should the name be preserved.

Cmn

Public constructors

UnconditionallyKeep

UnconditionallyKeep(shouldPreserveName: Boolean = true)

Public properties

shouldPreserveName

val shouldPreserveName: Boolean

Should the name be preserved.

Generally this is true if the reference is external, but this can be disabled if the name isn't important.