Hello, I am using moko-resource for sharing image,...
# moko
a
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
You need to build the project on Android (assuming) for them to be generated.
a
Thanks.
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
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
but it's strange that you say
After I run the gradle 'generateMRCommonMain' task , then get the same result
where you check generated result after call
generateMRCommonMain
? in what source set