moko-resources icon indicating copy to clipboard operation
moko-resources copied to clipboard

[iOS] Copy Moko-resources build step on CI triggers linkDebugFrameworkIosArm64

Open andreymosin opened this issue 8 months ago • 2 comments

Hello, we are experiencing weird behavior of Copy moko resources step while building app on CI via fastlane. For whatever reason it triggers linkDebugFrameworkIosArm64 gradle task again which results in 12 min of extra build time

Issue does not appear when working with XCode.

Build step script is:

./gradlew -p "${SRCROOT}/../../" :shared:umbrella:copyFrameworkResourcesToApp \
    -Pmoko.resources.PLATFORM_NAME="$PLATFORM_NAME" \
    -Pmoko.resources.CONFIGURATION="$KOTLIN_FRAMEWORK_BUILD_TYPE" \
    -Pmoko.resources.ARCHS="$ARCHS" \
    -Pmoko.resources.BUILT_PRODUCTS_DIR="$BUILT_PRODUCTS_DIR" \
    -Pmoko.resources.CONTENTS_FOLDER_PATH="$CONTENTS_FOLDER_PATH"

Version on Moko-resources is 0.24.5

Thank you!

andreymosin avatar Jul 07 '25 10:07 andreymosin

hello. copyFrameworkResourcesToApp task decide what version of linkTask should be used as framework output by this properties:

  • moko.resources.CONFIGURATION
  • moko.resources.PLATFORM_NAME
  • moko.resources.ARCHS

linkDebugFrameworkIosArm64 calls because you pass:

  • moko.resources.CONFIGURATION = Debug
  • moko.resources.PLATFORM_NAME = iphoneos
  • moko.resources.ARCHS = arm64

maybe your CI build Release framework but in this build step you always pass KOTLIN_FRAMEWORK_BUILD_TYPE = Debug instead of Release for Release configurations

Alex009 avatar Jul 13 '25 13:07 Alex009

Hello @Alex009 No, architectures match.

Interestingly, when I have started to use cached ~/.gradle folder on CI machine, problem has disappeared. To elaborate: We use a runner that creates a clean VM for every build. For every build I create a symlink so that ~/.gradle points at a folder on runner itself.

However all our build at Bitrise suffer from the original problem

andreymosin avatar Jul 14 '25 06:07 andreymosin