Skip to content

Commit 5dada0f

Browse files
committed
fix: use -scheme instead of -target to enable -derivedDataPath
1 parent 07ab1ee commit 5dada0f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/build-plugin.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ build_plugin() {
2323

2424
echo "Building $PLUGIN_TARGET ($arch)..." >&2
2525

26-
# Use a dedicated DerivedData path to avoid stale artifacts from other builds
26+
# Use -scheme (not -target) with -derivedDataPath to ensure proper
27+
# transitive SPM dependency resolution in explicit module builds
2728
DERIVED_DATA_DIR="build/DerivedData"
2829

2930
if ! xcodebuild \
3031
-project "$PROJECT" \
31-
-target "$PLUGIN_TARGET" \
32+
-scheme "$PLUGIN_TARGET" \
3233
-configuration "$CONFIG" \
3334
-arch "$arch" \
3435
ONLY_ACTIVE_ARCH=YES \
35-
CONFIGURATION_BUILD_DIR="$build_dir" \
36+
CONFIGURATION_BUILD_DIR="$(pwd)/$build_dir" \
3637
CODE_SIGN_IDENTITY="$SIGN_IDENTITY" \
3738
CODE_SIGN_STYLE=Manual \
3839
DEVELOPMENT_TEAM="$TEAM_ID" \

0 commit comments

Comments
 (0)