-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Milestone
Description
Hello!
Been using 0.24.alpha-5, and it doesn't appear possible to readText() when running a unit test via iOS in KMP. FileResource requires a context, but it's been tricky to implement this.
There's a similar library kotlinx-resources that implements this for text files:
/*
* For Apple platforms, move resources into the binary's output directory so that they
* can be loaded using `NSBundle.mainBundle` and related APIs.
*/
if (isAppleCompilation(kotlinCompilation)) {
val target = kotlinCompilation.target
target.binaries.forEach { binary ->
setupCopyResourcesTask(
kotlinCompilation = kotlinCompilation,
taskName = getTaskName("copyResources", binary.name, target.targetName),
outputDir = binary.outputDirectory,
mustRunAfterTasks = listOf(kotlinCompilation.processResourcesTaskName),
dependantTasks = listOf(binary.linkTaskName)
)
}
}Would be cool to have something similar here! 🚀
Metadata
Metadata
Assignees
Labels
No labels