https://kotlinlang.org logo
#moko
Title
# moko
j

Jan

09/25/2023, 1:09 PM
Hi, I have a problem with this section https://github.com/icerockdev/moko-resources#without-orgjetbrainskotlinnativecocoapods in the moko documentation. More in Thread:
I have a seperate kotlin multiplatform library project for moko resources called 'gs_resources_multiplatform'. This project is then included in my main multiplatform project.
When I use the following as a run script phase, my iOS app fails to build because it can't find the gradle task:
Copy code
"$SRCROOT/../gradlew" -p "$SRCROOT/../" :gs_resources_multiplatform:copyFrameworkResourcesToApp \
    -Pmoko.resources.PLATFORM_NAME="$PLATFORM_NAME" \
    -Pmoko.resources.CONFIGURATION="$CONFIGURATION" \
    -Pmoko.resources.ARCHS="$ARCHS" \
    -Pmoko.resources.BUILT_PRODUCTS_DIR="$BUILT_PRODUCTS_DIR" \
    -Pmoko.resources.CONTENTS_FOLDER_PATH="$CONTENTS_FOLDER_PATH"
But if I apply this:
Copy code
cd "$SRCROOT/.."
./gradlew :gs_resources_multiplatform:embedAndSignAppleFrameworkForXcode
as a run script phase to my xcode project it works
at least strings an images defined in moko-resources are working on iOS&android
Any clue why it can't find the gradle task for the first example?
5 Views