1

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'
   }
  }
}
Community
  • 1
  • 1
Tom Koptel
  • 309
  • 1
  • 9
  • Did you solve the problem? I am thinking about a seperate testapp which has only the purpose to test the library. Or did you find a different solution? – Sven Nov 14 '17 at 15:17
  • Unfortunately, I didn't :( The truth is I could not achieve this with a lib module setup. One of the alternatives is to have sample app alongside with library module where you can embed your UI tests. This would trick system to pack library code in the sample app. Then you can enable proguard in the sample app. – Tom Koptel Nov 19 '17 at 09:07

0 Answers0