The Gradle configurations into which dependencies can be placed for those source sets match their names with "Implementation" appended
jw
07/01/2024, 5:54 PM
You can validate your dependencies are going the right place with the
dependencies
task and looking for the matching configuration names
jw
07/01/2024, 5:55 PM
Or, you know, by just trying to use them
m
Max
07/01/2024, 6:24 PM
Thx @jw! I did not know I need to get
androidUnitTest
source set differently than
commonMain
,
iosMain
or
androidMain
. Had to add `by getting`:
Copy code
val androidUnitTest by getting
androidUnitTest.dependencies {
implementation(libs.kotlin.test)
implementation(libs.kotlin.test.junit)
implementation(libs.mockk)
}
Now it works. Thx!
m
Michael Krussel
07/01/2024, 8:26 PM
if there is a source set with
Main
there is normally another one with
Test
.
commonMain
,
commonTest
,
iosMain
,
iosTest
. Android is special, since it has two source sets for tests.