Android multi module test dependency

前端 未结 1 419
星月不相逢
星月不相逢 2021-01-01 13:46

With Android Studio 3.0 / android_gradle_version = \'3.0.1\' / gradle-4.5

Let\'s say I have two android modules

module-base
module-a
         


        
相关标签:
1条回答
  • 2021-01-01 14:30

    Actually I find just workaround for this. Don't use test sources from module-base but use sources from test related module module-testutils which is defined like this

    dependencies{
       testImplementation project(':module-testutils')
    }
    

    Thus you can share common test code which will be excluded for non-testable apk.

    0 讨论(0)
提交回复
热议问题