Skip to content

Commit

Permalink
fix: setup flutter environment for Xcode iOS builds
Browse files Browse the repository at this point in the history
The path to flutter_export_environment.sh is different for iOS project.
  • Loading branch information
knopp committed Sep 21, 2023
1 parent 7467b9a commit a39a140
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions build_pod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@ export CARGOKIT_TOOL_TEMP_DIR=$TARGET_TEMP_DIR/build_tool
# Directory inside root project. Not necessarily the top level directory of root project.
export CARGOKIT_ROOT_PROJECT_DIR=$SRCROOT

FLUTTER_EXPORT_ENVIRONMENT="$PODS_ROOT/../Flutter/ephemeral/flutter_export_environment.sh"

if [[ -f "$FLUTTER_EXPORT_ENVIRONMENT" ]]; then
source "$FLUTTER_EXPORT_ENVIRONMENT"
fi
FLUTTER_EXPORT_BUILD_ENVIRONMENT=(
"$PODS_ROOT/../Flutter/ephemeral/flutter_export_environment.sh" # macOS
"$PODS_ROOT/../Flutter/flutter_export_environment.sh" # iOS
)

for path in "${FLUTTER_EXPORT_BUILD_ENVIRONMENT[@]}"
do
if [[ -f "$path" ]]; then
source "$path"
fi
done

"$BASEDIR/run_build_tool.sh" build-pod "$@"

Expand Down

0 comments on commit a39a140

Please sign in to comment.