My app is under the dex limit for regular builds, but is giving the dex limit build error for test builds:
Conversion to Dalvik format failed:
Unable to execute dex: method ID not in [0, 0xffff]: 65536
It seems to be because of the addition of these libraries for testing:
androidTestCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'org.powermock:powermock-api-mockito:1.6.5'
androidTestCompile 'org.powermock:powermock-module-junit4:1.6.5'
I know that I could go to multidex builds, but I want to avoid it as long as possible so that my build times don't go up - it would be a last resort. I also can't set the minSdkVersion to 21 for debug builds since I'm targeting API 19 devices. I would really like to continue using the above libraries - there is no good alternative to these.
Is there anything I can do under my gradle configuration to limit multidex to just the test builds? Or any other possible solution for this?