Hello, Let’s say, I have a project with 2 modules:...
# multiplatform
s
Hello, Let’s say, I have a project with 2 modules: A & B. A module contains TestUtil class defined under
commonTest
. Is it possible to access to this class from *B*’s
commonTest
? I thought to do something like this, but it does not seems to work:
Copy code
commonMain {
 dependencies {
  implementation(project(':moduleA'))
 }
}
commonTest {
 dependencies {
  implementation(project(':moduleA'))
 }
}
r
Test sources can’t depend on other module’s test sources. They can depend on main sources, though, so you could create module C, move
TestUtil
to its
commonMain
, and depend on C from A’s and B’s tests.
👌 1
s
Got it. Thank you