kotlin library for both test
and android tests
, unit tests and UI tests.
If I write the bellow two lines as part of build.gradle it works fine.
my question is, is this the right way to add the library to use in both test and android tests
build.gradle
androidTestImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
Thank you for your valuable suggestions
thanks R
Generally speaking, yes, insofar as you need to have both an
androidTestImplementation
and atestImplementation
statement, even if they are both for the same library.If you wanted to keep the library in sync, you might define a constant for the library's Maven coordinates: