Add testutils as test dep of library-core module

The current workaround seems to cause compilation errors inside the
testutils module in Android Studio. This seems to fix them.

This doesn't introduce a circular dependency because it's only
the tests in library-core depending on testutils.

PiperOrigin-RevId: 281318192
This commit is contained in:
ibaker 2019-11-19 18:01:03 +00:00 committed by Oliver Woodman
parent 1730b6bb51
commit fc0aa08d79

View file

@ -35,16 +35,6 @@ android {
testInstrumentationRunnerArguments clearPackageData: 'true'
}
// Workaround to prevent circular dependency on project :testutils.
sourceSets {
androidTest {
java.srcDirs += '../../testutils/src/main/java/'
}
test {
java.srcDirs += '../../testutils/src/main/java/'
}
}
buildTypes {
debug {
testCoverageEnabled = true
@ -66,11 +56,13 @@ dependencies {
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion
androidTestImplementation 'org.mockito:mockito-core:' + mockitoVersion
androidTestImplementation project(modulePrefix + 'testutils')
testImplementation 'androidx.test:core:' + androidxTestCoreVersion
testImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion
testImplementation 'com.google.truth:truth:' + truthVersion
testImplementation 'org.mockito:mockito-core:' + mockitoVersion
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
testImplementation project(modulePrefix + 'testutils')
}
ext {