Has anyone tried hooking into the new iOS Resource...
# compose-ios
c
Has anyone tried hooking into the new iOS Resources copy task in CMP 1.5.x? I'm trying to generate a file (via a Gradle task) and then copy it in via along with the rest of the files in
src/commonMain/resources
? I'm slowly getting there, but wondering if anyone else has tried?
1
l
What are you trying to do?
c
Generate a list of licenses from libraries used in the app using Licensee, copy the resulting JSON to somewhere which will be bundled in the app. I have Android working nicely (here), but need to get it working on iOS too.
Just closing the loop on this. I couldn't find a way to hook into the sync resources tasks without copying in a load of the internal implementation. I decided to go another way, and just invoke the Gradle task from an Xcode Build Phase, and copy the file over into the bundle. It works well but I'd rather do it from Gradle.
👌 3
l
Well, just a thought, but doesn’t Gradle execute some xcode build phases? If yes, could you hook into that one?
c
No, it's the other way around.
l
Yes, but when you run the build from Android Studio (when running the app using kmm plugin), it must somehow execute the build phase from gradle no?
c
No I don't believe so, it invokes
xcodebuild
under the hood for you (I also don't use that plugin).
👍 1
l
Oh okay, that figures. Well, I hope you can find some way to do it from the gradle in the future. But since it does invoke some task from gradle, maybe one can hook into that one hah