Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add build option to force inclusion of dev_dependencies #171445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hig-dev
Copy link

@hig-dev hig-dev commented Jul 1, 2025

In the latest stable release version of Flutter dev_dependencies are excluded from release builds. This leads to the issues #170119 and #167377. The PR #171015 fixed this issues only for iOS and macOS build by going a step backward. The PR changed the behavior to always include the dev_dependencies even in release build. This has the downside that the release build gets bigger again and maybe it could lead to other problems as well. So, in general it is desireable to strip out the dev_dependencies in release builds. However, there are scenarios like integration testing in which you want to have a release build including dev_dependencies.

So my PR adds the build option --force-include-dev-dependencies that ensures that the dev_dependencies are included in all build modes.

I would prefer this PR over #171015 because it does not go a step backward and solves the same issues. This PR is not a breaking change.

Example usage:

flutter build ios integration_test/foo_test.dart --release --force-include-dev-dependencies

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@hig-dev hig-dev requested review from a team as code owners July 1, 2025 14:37
@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. team-android Owned by Android platform team team-ios Owned by iOS platform team labels Jul 1, 2025
@github-actions github-actions bot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. f: integration_test The flutter/packages/integration_test plugin labels Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: tests "flutter test", flutter_test, or one of our tests f: integration_test The flutter/packages/integration_test plugin framework flutter/packages/flutter repository. See also f: labels. team-android Owned by Android platform team team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant