This message was deleted.
# community-support
s
This message was deleted.
e
test fixtures are what you want. move the code you wish to share into the test fixtures of A, then add it as a dependent to B and C tests
m
Could you explain the steps a bit more? Because I feel like the docs are a bit ambigous. From what I understand, i should add plugins {
java-library
java-test-fixtures
maven-publish
} To module A, then move the base test class to
src/testFixtures/kotlin
, right? How do I consume it then in modules B and C?
e
Copy code
testImplementation(testFixtures(project(":a")))
m
Thank you, I will test it tomorrow
One more thing, should I initialize testFixtures in
src/testFixtures/kotlin
as a module or just a plain directory?
e
it's a source root just like main or test
m
Great, thanks a lot
I'm getting
The 'java' plugin has been applied, but it is not compatible with the Android plugins.
error on gradle sync. Does that mean the testFixtures cant be used with any sort of android dependencies in the module?
the
java-library
plugin is causing that btw
e
yes
AGP does support test fixtures on its own, but there are some limitations