问题
Seemingly the same root cause as this question, but the answer there will not work for me. I have a custom source set called commonTest
that I use for sharing certain test utility code across the test
and androidTest
source sets. Here is my relevant project config:
sourceSets {
// This lets us write test utility code that can be used by both unit tests and android tests
commonTest {
java
}
test {
java.srcDirs += commonTest.java.srcDirs
}
androidTest {
java.srcDirs += commonTest.java.srcDirs
}
}
This worked fine with AGP 3.0.1, but breaks on AGP 3.1.0. Are custom source sets no longer supported?
来源:https://stackoverflow.com/questions/49601232/the-sourceset-commontest-is-not-recognized-by-the-android-gradle-plugin-perha