Move iOS codesigning into assemble build target (#77664)
This commit is contained in:
@@ -165,6 +165,11 @@ is set to release or run \"flutter build ios --release\", then re-run Archive fr
|
||||
code_size_directory="-dCodeSizeDirectory=${CODE_SIZE_DIRECTORY}"
|
||||
fi
|
||||
|
||||
local codesign_identity_flag=""
|
||||
if [[ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" && "${CODE_SIGNING_REQUIRED:-}" != "NO" ]]; then
|
||||
codesign_identity_flag="-dCodesignIdentity=${EXPANDED_CODE_SIGN_IDENTITY}"
|
||||
fi
|
||||
|
||||
RunCommand "${FLUTTER_ROOT}/bin/flutter" \
|
||||
${verbose_flag} \
|
||||
${flutter_engine_flag} \
|
||||
@@ -183,6 +188,7 @@ is set to release or run \"flutter build ios --release\", then re-run Archive fr
|
||||
-dTrackWidgetCreation="${TRACK_WIDGET_CREATION}" \
|
||||
-dDartObfuscation="${DART_OBFUSCATION}" \
|
||||
-dEnableBitcode="${bitcode_flag}" \
|
||||
"${codesign_identity_flag}" \
|
||||
${bundle_sksl_path} \
|
||||
${code_size_directory} \
|
||||
--ExtraGenSnapshotOptions="${EXTRA_GEN_SNAPSHOT_OPTIONS}" \
|
||||
@@ -214,15 +220,7 @@ EmbedFlutterFrameworks() {
|
||||
|
||||
# Embed the actual Flutter.framework that the Flutter app expects to run against,
|
||||
# which could be a local build or an arch/type specific build.
|
||||
|
||||
# Copy Xcode behavior and don't copy over headers or modules.
|
||||
RunCommand rsync -av --delete --filter "- .DS_Store" --filter "- Headers" --filter "- Modules" "${BUILT_PRODUCTS_DIR}/Flutter.framework" "${xcode_frameworks_dir}/"
|
||||
|
||||
# Sign the binaries we moved.
|
||||
if [[ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" ]]; then
|
||||
RunCommand codesign --force --verbose --sign "${EXPANDED_CODE_SIGN_IDENTITY}" -- "${xcode_frameworks_dir}/App.framework/App"
|
||||
RunCommand codesign --force --verbose --sign "${EXPANDED_CODE_SIGN_IDENTITY}" -- "${xcode_frameworks_dir}/Flutter.framework/Flutter"
|
||||
fi
|
||||
RunCommand rsync -av --delete --filter "- .DS_Store" "${BUILT_PRODUCTS_DIR}/Flutter.framework" "${xcode_frameworks_dir}/"
|
||||
|
||||
AddObservatoryBonjourService
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user