lundi 30 janvier 2017

How to configure Proguard for Android instrumentation test inside library project?

The proguard configurations is a pain when we try to configure rules for instrumentation tests that reside inside library module. There was answer to the same kinda question before, but it works only for application module not library one.

Is there anyway to enforce proguard rules to be applied for instrumentation test app that is part of library module?

apply plugin: 'com.android.library'

android {
  buildTypes {
   all {
     minifyEnabled true
     proguardFile 'proguard-rules.pro'
     testProguardFile 'test-proguard-rules.pro'
   }
  }
}

Aucun commentaire:

Enregistrer un commentaire