Hello, I am using moko-resource for sharing image, I find that when I add or update images to resource folder, the MR.images.* variables are not updated . After I run the gradle 'generateMRCommonMain' task , then get the same result. Is there something I missing?
v
Vidmantas Kerbelis
05/29/2023, 1:09 PM
You need to build the project on Android (assuming) for them to be generated.
a
Ayla
05/29/2023, 3:25 PM
Thanks.
Ayla
05/29/2023, 3:50 PM
All things work well. But it would be better to have a plugin-like tool to auto detect resource changes and run gradle tasks. Is there any plan ?I'd like to contribute.
a
alex009
05/30/2023, 7:35 AM
hi.
gradle task
generateMRCommonMain
should be called after changes in resources directory to generate new MR class.
some autodetection inside gradle plugin can't be implemented because gradle plugin works only when gradle do some work (when you call gradle task).
so autoupdate can be implemented only with IDE plugin
alex009
05/30/2023, 7:36 AM
but it's strange that you say
After I run the gradle 'generateMRCommonMain' task , then get the same result