icerockdev / moko-resources

Resources access for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
1.09k stars 120 forks source link

macOS target support #127

Closed nrobi144 closed 3 years ago

nrobi144 commented 3 years ago

Are there any plans to support desktop and macOS targets?

Alex009 commented 3 years ago

as i answer in slack - for this have no plans. but i can help external contributors with consultations how implement it. in exchange for pull request with this changes :)

here small sample - https://github.com/icerockdev/moko-parcelize/compare/develop...%236-macos-support

Alex009 commented 3 years ago

@nrobi144 in new mobile-multiplatform gradle plugin release was added support of all apple family frameworks, in moko-graphics and moko-parcelize releases it was used: https://github.com/icerockdev/moko-graphics/pull/11/files https://github.com/icerockdev/moko-parcelize/pull/9/files

so in resources it should be used too.

for resources will be required this: https://github.com/icerockdev/moko-graphics/blob/master/buildSrc/src/main/kotlin/Deps.kt#L43 to correctly export dependency into macos framework here: https://github.com/icerockdev/moko-graphics/blob/master/sample/mpp-library/build.gradle.kts#L21 you should use apple-framework plugin https://github.com/icerockdev/moko-graphics/blob/master/buildSrc/src/main/kotlin/Deps.kt#L29

also moko-graphics and moko-parcelize already available on bintray (version 0.5.0 both).