title: Proguard strips custom annotations in Kotlin
body: <p>My Kotlin project uses MVP architecture. Custom annotations are being used to the bins presenter to the view for example:</p>
  
  <pre><code>@PresenterBinding(MyPresenter::class)
  class MyActivity{
  </code></pre>
  
  <p>When this project is build with Proguard's</p>
  
  <pre><code>minifyEnabled true
  </code></pre>
  
  <p>The link of presenter to the view is lost and I get <code>kotlin.KotlinNullPointerException</code> accessing presenter functions</p>
  
  <p>Following bits are there in my Proguard config (among other keep rules)</p>
  
  <pre><code># Kotlin rules #
  -assumenosideeffects class kotlin.jvm.internal.Intrinsics {
      static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
  }
  -keepclassmembers class **$WhenMappings {
      &lt;fields&gt;;
  }
  -dontwarn kotlin.**
  -keep class kotlin.**
  
  -keepattributes *Annotation*
  </code></pre>
  
  <p>I have tried many things, however no luck yet.
  Any pointers to the right are welcome.</p>