DexOpener

This is a sample app demonstrating the use of the DexOpener library in a multi module project. It is part of a medium post.

Architecture

The demo app consists of 3 modules.

  • app
  • common
  • mylibrary

App

You can check out the app/build.gradle and play with the 2 testInstrumentationRunner options.

testInstrumentationRunner "com.example.dexopener.DexOpeningTestRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

You'll notice that the default AndroidJUnitRunner will not let you have a successful test run on < API 28. Whereas the DexOpeningTestRunner will mitigate this problem.