Rohit Verma
04/30/2025, 2:08 PMtesting
and add some dependencies in the commonMain
source set:
commonMain.dependencies {
@OptIn(ExperimentalComposeLibrary::class)
api(compose.uiTest)
}
desktopMain.dependencies {
api(compose.desktop.currentOs)
}
And implements this module into another module, i.e., home
module in the commonTest
source set:
commonTest.dependencies {
implementation(projects.uiTesting)
}
Will the dependencies added in the commonMain
inside testing
module included into the build-artifact/APK?mbonnin
04/30/2025, 2:10 PMcommonTest
is usually not part of your final binaryRohit Verma
04/30/2025, 2:11 PMRohit Verma
04/30/2025, 2:12 PMVampire
04/30/2025, 2:13 PMhome
is your "main thing".
Everything in home:commonMain
is productive code,
everything in home:commonTest
is test code.
Whatever home:commonTest
depends on is test code from the PoV of the home
project.Rohit Verma
04/30/2025, 2:16 PMRohit Verma
04/30/2025, 5:41 PMhome
module. But it didn't happened. Do you know why?
dependencies {
@OptIn(ExperimentalComposeLibrary::class)
commonTestApi(compose.uiTest)
desktopTestApi(compose.desktop.currentOs)
androidTestImplementation(libs.androidx.compose.ui.test)
debugImplementation(libs.androidx.compose.ui.test.manifest)
}
Rohit Verma
04/30/2025, 5:43 PM