If you write a library and want to provide 1! useful test function, where do you store this function?
In the main source with a comment, in the main source with an extra annotation like
TestingOnly
, or do you really create a new module containing only 1 function and publish it?
r
Rob Elliot
01/02/2022, 11:24 AM
I'd favour a new module - you can use gradle's
testFixtures
configuration to keep it in the same gradle project as the main source.
After all, it may be one now but there's a decent chance it grows. It may also have different dependency requirements to the main source.