goncalossilva / kotlinx-resources

Kotlin Multiplatform (KMP) library for reading resources in tests
MIT License
109 stars 5 forks source link

Use from commonMain #69

Closed TSkovsgaard closed 1 year ago

TSkovsgaard commented 1 year ago

Hi I read your comment here https://github.com/goncalossilva/kotlinx-resources/issues/20 but this could actually be really helpful :)

So in my case, I'm using Apollo and their mock server: https://www.apollographql.com/docs/kotlin/testing/mocking-http-responses in my app I'm able to run on local mocked data, but my responses needs to be json strings, I want to have a lot of different json files in my resource folder and read them as needed to serve my mockserver with some response data. Your library fits perfectly for this but only for my tests, I would like to use it in commonMain also :)

goncalossilva commented 1 year ago

Thanks for resurfacing this, @TSkovsgaard. While I would welcome expanding this library to cover production use cases, I have to say that the current implementation is very far from being viable. Besides, I'd have a slew of questions on how to correctly handle bundling of production resources in each flavor. Also, #36 would be a blocker for this.

But please expand on your use case. Is it true that your production version is running on mocked data?

goncalossilva commented 1 year ago

Closing (hopefully temporarily) due to lack of follow-up.