Add Rive Native setup build phase for macOS

Introduces a conditional shell script build phase to run 'rive_native:setup' during the build process if 'flet_rive' is present in Flutter dependencies. This ensures proper setup of Rive Native for macOS builds.
This commit is contained in:
Feodor Fitsner 2026-01-16 12:34:42 -08:00
parent 3ea4edca82
commit cc2eb7e9ad
1 changed files with 24 additions and 0 deletions

View File

@ -11,6 +11,9 @@
isa = PBXAggregateTarget; isa = PBXAggregateTarget;
buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
buildPhases = ( buildPhases = (
{% if 'flet_rive' in cookiecutter.flutter.dependencies %}
A1B2C3D4E5F60718293A4B5C /* Rive Native Setup */,
{% endif %}
33CC111E2044C6BF0003C045 /* ShellScript */, 33CC111E2044C6BF0003C045 /* ShellScript */,
); );
dependencies = ( dependencies = (
@ -291,6 +294,27 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
{% if 'flet_rive' in cookiecutter.flutter.dependencies %}
A1B2C3D4E5F60718293A4B5C /* Rive Native Setup */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Rive Native Setup";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\nDART_BIN=\"${FLUTTER_ROOT}/bin/dart\"\nif [ ! -x \"$DART_BIN\" ]; then\n DART_BIN=\"$(command -v dart || true)\"\nfi\nif [ -z \"$DART_BIN\" ]; then\n echo \"error: dart not found; cannot run rive_native:setup\" >&2\n exit 1\nfi\necho \"Running rive_native setup for macos...\"\n\"$DART_BIN\" run rive_native:setup --verbose --clean --platform macos\n";
};
{% endif %}
3399D490228B24CF009A79C7 /* ShellScript */ = { 3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1; alwaysOutOfDate = 1;