mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

* Update project.pbxproj files to say Flutter rather than Chromium Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright. * Update the copyright notice checker to require a standard notice on all files * Update copyrights on Dart files. (This was a mechanical commit.) * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine. Some were already marked "The Flutter Authors", not clear why. Their dates have been normalized. Some were missing the blank line after the license. Some were randomly different in trivial ways for no apparent reason (e.g. missing the trailing period). * Clean up the copyrights in non-Dart files. (Manual edits.) Also, make sure templates don't have copyrights. * Fix some more ORGANIZATIONNAMEs
77 lines
3.0 KiB
Bash
Executable File
77 lines
3.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright 2014 The Flutter Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
# TODO(jonahwilliams): refactor this and xcode_backend.sh into one script
|
|
# once iOS is using 'assemble'.
|
|
RunCommand() {
|
|
if [[ -n "$VERBOSE_SCRIPT_LOGGING" ]]; then
|
|
echo "♦ $*"
|
|
fi
|
|
"$@"
|
|
return $?
|
|
}
|
|
|
|
EchoError() {
|
|
echo "$@" 1>&2
|
|
}
|
|
|
|
# Set the working directory to the project root
|
|
project_path="${SOURCE_ROOT}/.."
|
|
RunCommand pushd "${project_path}" > /dev/null
|
|
|
|
# Set the verbose flag.
|
|
verbose_flag=""
|
|
if [[ -n "$VERBOSE_SCRIPT_LOGGING" ]]; then
|
|
verbose_flag="--verbose"
|
|
fi
|
|
|
|
# Set the target file.
|
|
target_path="lib/main.dart"
|
|
if [[ -n "$FLUTTER_TARGET" ]]; then
|
|
target_path="${FLUTTER_TARGET}"
|
|
fi
|
|
|
|
if [[ -n "$FLUTTER_ENGINE" ]]; then
|
|
flutter_engine_flag="--local-engine-src-path=${FLUTTER_ENGINE}"
|
|
fi
|
|
|
|
# Set the build mode
|
|
build_mode="$(echo "${FLUTTER_BUILD_MODE:-${CONFIGURATION}}" | tr "[:upper:]" "[:lower:]")"
|
|
|
|
if [[ -n "$LOCAL_ENGINE" ]]; then
|
|
if [[ $(echo "$LOCAL_ENGINE" | tr "[:upper:]" "[:lower:]") != *"$build_mode"* ]]; then
|
|
EchoError "========================================================================"
|
|
EchoError "ERROR: Requested build with Flutter local engine at '${LOCAL_ENGINE}'"
|
|
EchoError "This engine is not compatible with FLUTTER_BUILD_MODE: '${build_mode}'."
|
|
EchoError "You can fix this by updating the LOCAL_ENGINE environment variable, or"
|
|
EchoError "by running:"
|
|
EchoError " flutter build macos --local-engine=host_${build_mode}"
|
|
EchoError "or"
|
|
EchoError " flutter build macos --local-engine=host_${build_mode}_unopt"
|
|
EchoError "========================================================================"
|
|
exit -1
|
|
fi
|
|
local_engine_flag="--local-engine=${LOCAL_ENGINE}"
|
|
fi
|
|
|
|
# The path where the input/output xcfilelists are stored. These are used by xcode
|
|
# to conditionally skip this script phase if neither have changed.
|
|
ephemeral_dir="${SOURCE_ROOT}/Flutter/ephemeral"
|
|
build_inputs_path="${ephemeral_dir}/FlutterInputs.xcfilelist"
|
|
build_outputs_path="${ephemeral_dir}/FlutterOutputs.xcfilelist"
|
|
|
|
RunCommand "${FLUTTER_ROOT}/bin/flutter" --suppress-analytics \
|
|
${verbose_flag} \
|
|
${flutter_engine_flag} \
|
|
${local_engine_flag} \
|
|
assemble \
|
|
-dTargetPlatform=darwin-x64 \
|
|
-dTargetFile="${target_path}" \
|
|
-dBuildMode="${build_mode}" \
|
|
--build-inputs="${build_inputs_path}" \
|
|
--build-outputs="${build_outputs_path}" \
|
|
--output="${ephemeral_dir}" \
|
|
"${build_mode}_macos_bundle_flutter_assets"
|