George Karpenko
06/05/2024, 11:22 AMmoko-resources:0.24.0-beta-4
and kotlin 1.9.23
. I've copied moko-resources manually via task:
./gradlew shared:copyResourcesSharedReleaseXCFrameworkToApp \
-Pmoko.resources.BUILT_PRODUCTS_DIR="$BUILT_PRODUCTS_DIR" \
-Pmoko.resources.CONTENTS_FOLDER_PATH="$CONTENTS_FOLDER_PATH"
And everything worked fine there.
Now i'm upgrading to kotlin 2.0.0
and latest moko-resources:0.24.0-beta-5
with already added configureCopyXCFrameworkResources("shared")
instead of custom script. But after linkReleaseFrameworkIosArm64
succeeded i do my custom copyXCFramework
which is:
fun Task.copyXCFramework(projectName: String) {
val buildPathRelease =
"build/bin/ios${if (isIosSimulator()) "Simulator" else ""}Arm64/releaseFramework/$projectName.framework"
val iosXCBinaryPath = "../iosApp/Libraries/$projectName.xcframework"
project.delete(iosXCBinaryPath)
project.copy {
from(buildPathRelease)
into(iosXCBinaryPath)
}
}
so on this stage i'm not able to copy moko files, because it fails on:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':shared'.
> Could not create task ':shared:copyXCFramework'.
> Cannot convert URL 'sts-client.shared:localization.bundle' to a file.
Can you help me with this without repro?George Karpenko
06/05/2024, 11:31 AMfile_path="${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/sts-client.shared:localization.bundle"
# test if moko resources are already copied
if [ -e "$file_path" ]; then
echo "Skipping Moko resources, already copied..."
else
cd ..
./gradlew shared:copyResourcesSharedReleaseXCFrameworkToApp \
-Pmoko.resources.BUILT_PRODUCTS_DIR="$BUILT_PRODUCTS_DIR" \
-Pmoko.resources.CONTENTS_FOLDER_PATH="$CONTENTS_FOLDER_PATH"
fi
but task copyResourcesSharedReleaseXCFrameworkToApp
doesn't exist anymoreGeorge Karpenko
06/05/2024, 12:07 PMbeta-4
and do copying manually via same script