Jeff Lockhart
07/04/2022, 7:28 AMkotlin {
sourceSets {
val androidTest by getting {
resources.srcDir("src/commonTest/resources")
...
doesn't copy the resources from the common location for Android tests. Is there a good way to avoid duplicating these resource folders between source sets (hopefully other than a manual symlink)?wbertan
07/04/2022, 7:37 AMprivate fun TestOptions.configure() = apply {
unitTests.isIncludeAndroidResources = true
}
So maybe that is what does the trick? At least for the unit tests.
We have shared unit tests, and we are able to see the shared moko resources.Racka N
07/04/2022, 8:03 AMexpect
declarations or any other classes/objects I have in commonTest
inside androidTest
but can access them inside desktopTest
and iOSTest
Racka N
07/04/2022, 8:04 AMJeff Lockhart
07/04/2022, 5:46 PMJeff Lockhart
07/04/2022, 6:00 PMandroid {
testOptions.unitTests.isIncludeAndroidResources = true
...
I still don't get the src/commonTest/resources in Android tests with this option enabled.Jeff Lockhart
07/04/2022, 6:11 PMval copyIosX64TestResources = tasks.register<Copy>("copyIosX64TestResources") {
from("src/commonTest/resources")
into("build/bin/iosX64/debugTest/resources")
}
tasks.findByName("iosX64Test")!!.dependsOn(copyIosX64TestResources)
Jeff Lockhart
07/04/2022, 6:33 PMtestOptions.unitTests.isIncludeAndroidResources = true
option was in order to include the resources from the application src/androidMain/resources location, and similarly would expect src/commonMain/resources to be included too. Is this how you're using it in your app?