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?
java.srcDirs
? Is there something that you get from having it be a source set? – Musketassets
. That's not in a separate source set. I can't find an example on my development machine of doing this with Java code; usually I just have that stuff be in a separate module. – Musket$projectDir/schemas
is not in a source set, yet we add it anyway. This seems to cover your concern, and this seems to be an outstanding issue on the subject. – MuskettestImplementation(project(":android-test-utils"))
– Stammel