Commit fc0aa08d by ibaker Committed by Oliver Woodman

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
parent 1730b6bb
Showing with 2 additions and 10 deletions
...@@ -35,16 +35,6 @@ android { ...@@ -35,16 +35,6 @@ android {
testInstrumentationRunnerArguments clearPackageData: 'true' 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 { buildTypes {
debug { debug {
testCoverageEnabled = true testCoverageEnabled = true
...@@ -66,11 +56,13 @@ dependencies { ...@@ -66,11 +56,13 @@ dependencies {
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion
androidTestImplementation 'org.mockito:mockito-core:' + mockitoVersion androidTestImplementation 'org.mockito:mockito-core:' + mockitoVersion
androidTestImplementation project(modulePrefix + 'testutils')
testImplementation 'androidx.test:core:' + androidxTestCoreVersion testImplementation 'androidx.test:core:' + androidxTestCoreVersion
testImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion testImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion
testImplementation 'com.google.truth:truth:' + truthVersion testImplementation 'com.google.truth:truth:' + truthVersion
testImplementation 'org.mockito:mockito-core:' + mockitoVersion testImplementation 'org.mockito:mockito-core:' + mockitoVersion
testImplementation 'org.robolectric:robolectric:' + robolectricVersion testImplementation 'org.robolectric:robolectric:' + robolectricVersion
testImplementation project(modulePrefix + 'testutils')
} }
ext { ext {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment