0

We have some test classes defined in KMM module 1 (commonTest). We have another KMM module 2 that depends on module 1 where we would like to re-use test classes from module1:commonTest in module2:commonTest. Is that possible? We tried adding dependency in the sourceSets but no luck.

Sakethram
  • 43
  • 6
  • 2
    this problem is not specific to KMM, you can search for general gradle solutions. shortly, you have to create a separate module, place the needed files into `commonMain`, then you can add this module as dependency to your other modules:commonTest – Phil Dukhov Apr 08 '23 at 00:44
  • Thanks Phil, it opened up my search/solution space. I tried using approaches here but no luck: https://stackoverflow.com/questions/5644011/multi-project-test-dependencies-with-gradle Will likely end up creating a new test module as needed. – Sakethram Apr 09 '23 at 03:50

0 Answers0