build_runner
A build system for Dart code generation and modular compilation.
2.16.0
1000K downloads/mo
#18 most downloaded on pub.dev
dart-lang/build
What this package is like to depend on
Last release 23 days ago
31 Jul 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 194 of 198 stable releases
1 version withdrawn
withdrawn after publishing
10 years old
201 releases · first in 2016
24 releases in the last 12 months
see the full history below
Release timeline
201 releases · Nov 2016 to Jul 2026
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Releases
latest 60 of 201-
2.16.031 Jul 2026Release notes
Open source →- New default output behavior: always fix incorrect generated files. For
example: if you "dart run build_runner build", modify a generated file,
then build again, it will be fixed, undoing your modifications. - New option,
--keep-modified-outputs. Use this to get the old output
behavior: manual modifications to generated files are kept. They will be
overwritten if a build is triggered due to an input file change, a
configuration change ordart run build_runner clean. - New option,
--only-check, for use in continuous builds and tests. With this
optionbuild_runnerwrites nothing, but builds and compares with the files
already on disk. If there is any difference between disk and expected output
then the differences are logged and the build fails. - Allow
package_config3.0.0.
Release notes
Open source →- New default output behavior: always fix incorrect generated files. For example: if you "dart run build_runner build", modify a generated file, then build again, it will be fixed, undoing your modifications.
- New option,
--keep-modified-outputs. Use this to get the old output behavior: manual modifications to generated files are kept. They will be overwritten if a build is triggered due to an input file change, a configuration change ordart run build_runner clean. - New option,
--only-check, for use in continuous builds and tests. With this optionbuild_runnerwrites nothing, but builds and compares with the files already on disk. If there is any difference between disk and expected output then the differences are logged and the build fails. - Allow
package_config3.0.0.
- New default output behavior: always fix incorrect generated files. For
-
2.15.327 Jul 2026Release notes
Open source →- Simplify deletion of stale outputs: don't try to handle package renames.
- The
daemonasset server now rejects various non-local connections. - Bug fix: in incremental builds, when an input was deleted, its output was deleted at the start of the build. Make it consistent with other output deletions: wait until the end of the build.
- Bug fix: post process builders with
build_to: sourcecan only write to output packages. - Bug fix: post process builders with
build_to: cachecan only write output corresponding to known packages. - Bug fix: reject incorrect builder config that has duplicate builder keys.
- Bug fix: reject invalid builder factories in
build.yaml. - Bug fix: correctly filter served or
--outputpost process output. - Bug fix:
servemode only serves the specified package subdirectories. - Bug fix:
servelive reload websocket checks for localhost origin. - Bug fix: don't follow symlinks when cleaning up output folders.
- Bug fix: catch Windows-specific absolute paths.
-
2.15.213 Jul 2026 -
2.15.108 Jul 2026Release notes
Open source →- Pass Dart SDK
--packagesarg to builder compiles, so they can be compiled with different packages to the current version solve. - More efficient watching for file changes in workspaces and other setups with nested packages.
- Support builders with no declared outputs. They can't output anything, but they can do processing, write log messages and choose whether to fail the build.
- Mention in command usage that
--definevalues are parsed as JSON with a fallback. - Performance: reduce size of serialized build state when there are optional outputs that are not written.
- Bug fix: handle errors from post process builders in previous runs without crashing.
- Bug fix: fix
dart run build_runner testto correctly pass arguments after--to the test process. - Bug fix: fix crash if a resolved Dart source contains invalid utf8.
- Bug fix: fix incorrect output when builder code changes during builder compile.
- Bug fix: do a clean build when switching between a workspace build and a package build, as incremental builds were sometimes incorrect.
- Require Dart 3.8.0.
- Pass Dart SDK
-
2.15.030 Apr 2026Release notes
Open source →- Remove
--low-resources-modeas default memory usage has been improved. If you have problems with RAM usage please file an issue. - Remove
--log-performanceand--track-performance. File an issue if you have performance measurement needs not covered by the newer--dart-aot-perf. - Removed options can still be passed, they will be ignored with a warning.
- Bug fix: fix crash during logging if an asset path is an invalid URI.
- Bug fix: with
--workspacethe global options affecting build order were read from the wrong package. They are now read frombuild.yamlin the workspace root, like other global options. - Allow
analyzer13.0.0.
- Remove
-
2.14.124 Apr 2026Release notes
Open source →- Bug fix: fix crash if a package used to belong to a workspace but was removed
from the workspace leaving a stale
workspace.reffile. - Bug fix: the
watchcommand now always does one build before exiting due to a request from anotherbuild_runnerprocess. Fix crashes related to request before build start.
- Bug fix: fix crash if a package used to belong to a workspace but was removed
from the workspace leaving a stale
-
2.14.022 Apr 2026Release notes
Open source →- Performance: further improvements to management of files for analysis for 2x faster incremental builds.
- Performance: default to AOT compilation for commands other than
run. This costs more initial startup time but gives faster builds afterwards. Fall back to JIT if the compile fails due to use ofdart:mirrors. Use the--force-jitflag if you want the old default JIT builder compile. Use the--force-aotflag to turn off the fallback to JIT compile. - Add support for
asset:scheme to the--build-filterflag. It is likepackage:but for the whole package, not justlib. For example,package:a/b.dartis the same asasset:a/lib/b.dart. - Paths specified using
--build-filterwhen using the--workspaceflag now apply to the current package, not the workspace root. Other packages must be referred to usingpackage:orasset:schemes. - Add OSC 8 hyperlinks for logged input paths.
- Better handling of deletions of files during the build: if the file is not needed ignore the deletion, if it's needed try to use the cached version, as a last resort restart the build.
- Defer deletions of files by
build_runneruntil the build is complete. Don't write files unless the contents changed. These reduce unnecessary work by tools that watch the filesystem. --workspaceflag is no longer experimental, remove the warning.- Add
--workspaceflag tocleancommand, use it to clear the cache used for a--workspacebuild. - Add new command
stop: rundart run build_runner stopto terminate a runningwatchorservecommand in the current package or workspace. If a build is in progress, the build will complete first. - Add locking:
build_runnerwill wait for any already-running command before running. If there is an already-runningwatchorservecommand, it will be closed after the currently-running build, as if you ran the newdart run build_runner stop. - Note: the
daemoncommand ignoresbuild_runner stopand ignores the new locking as it uses its own locking. - Bug fix: small correctness fix in input tracking.
- Bug fix: fix corner case that caused missing outputs with
build_runner servewhen directories were specified with a port, for examplebuild_runner serve web:0. Before the fix, non-optional outputs to cache underwebwould be skipped unless they were used by another build step. With the fix, all non-optional outputs underwebare built and served. - Bug fix: when building with
--workspacegenerate the entrypoint and compiled artifacts under the workspace root instead of the current package root. - Remove
code_builderdependency so builders can use any version of it.
-
2.13.120 Mar 2026 -
2.13.017 Mar 2026Release notes
Open source →- Performance: speedup of between 1.4x for small initial builds to 4x for large incremental builds. See https://github.com/dart-lang/build/pull/4405 for full benchmark results. Optimizations included: faster management of files for analysis, re-use syntax errors computation, avoid a throw/catch on "not yet generated" source, copy asset graph without a serialization round trip, re-use trigger configuration digest.
- Add
--dart-aot-perfflag for profiling on Linux. Use it with--force-aot. It runs the builders under theperfprofiling tool which writes toperf.data. - Add
--verbose-durationsflag that logs durations with greater precision. - Improve debugging instructions in README.md.
- Bug fix: fix line wrapping in
build_runnerargs usage output.
-
2.12.205 Mar 2026Release notes
Open source →- Bug fix: don't crash if
applies_buildersinbuild.yamlmentions an unknown builder.
- Bug fix: don't crash if
-
2.12.104 Mar 2026 -
2.12.003 Mar 2026 withdrawnRelease notes
Open source →- Add support for globs in the package list of workspace
pubspec.yaml, matching the new feature in Dart SDK3.11. - Support the
build_tokey added topost_process_buildersinbuild_config 1.3.0. Post process builders can use this to output files to the source tree. - Bug fix: prevent logging crash when using
build_testin a builder.
- Add support for globs in the package list of workspace
-
2.11.111 Feb 2026Release notes
Open source →- Improve logging on build script build failures, don't repeatedly log an identical failure.
- Bug fix: with
--workspaceflag, correctly build for sources in the workspace root instead of failing with "tried to delete from package not in the build".
-
2.11.005 Feb 2026Release notes
Open source →- Add
--workspaceflag. Use it withdart run build_runner buildorwatchto build or watch or all packages in the current workspace. It is currently experimental and subject to change based on feedback, please add feedback at https://github.com/dart-lang/build/discussions/4349. - Bug fix: fix crash in corner case with post process builder, optional builder
and output used for
--output,watchorserve. - Bug fix: fix crash in corner case with
watchorservewhen builders depend on generated files in the current build.
- Add
-
2.10.513 Jan 2026Release notes
Open source →- Add logging of builder compilation so you can tell how much time is spent on the JIT or AOT compile. Explicitly log restarts to recompile builders.
- Allow
analyzer10.0.0.
-
2.10.419 Nov 2025 -
2.10.314 Nov 2025Release notes
Open source →- Performance: improve scalability with the number of library cycles, making builds much faster for some large codebases.
- Bug fix: fix crash when you run
dart run build_runner buildin a subdirectory of a package. - Bug fix: in a workspace, generate for transitive dependencies of the current package instead of for all packages in the workspace.
-
2.10.211 Nov 2025Release notes
Open source →- Bug fix: fix issue with webdev failing due to a modification during a build.
- In "serve" and "watch" modes, retry failed compiles instead of exiting.
-
2.10.124 Oct 2025Release notes
Open source →- Performance: improve
findAssetsscalability, making it much faster for prefix matches in packages with thousands of files or more. One specific use case that is now faster is builders that usesource_genshared parts, for examplebuilt_valueandjson_serializable. - Bug fix: look up triggers in the
triggerssection ofbuild.yamlusing the full name. For the case in which the builder name matched the package name, the abbreviated name was being used instead. - Bug fix: fix incorrect log
with build_runner/aoton Windows with JIT.
- Performance: improve
-
2.10.020 Oct 2025Release notes
Open source →- Add AOT compilation of builders. A future release will AOT compile builders
automatically, for this release it's behind a flag. AOT compiled builders
start up faster and have higher throughput, for faster builds overall.
Builders that use
dart:mirrorscannot be AOT compiled. - Add
force-aotflag to AOT compile builders. - Add
force-jitflag to force the current default of JIT compiling builders. - Add the
--dart-jit-vm-argoption. Its values are passed todart runwhen a build script is started in JIT mode. This allows specifying options to attach a debugger to builders. - Require
analyzer8.0.0. Remove use of deprecatedanalyzermembers, use their recommended and compatible replacements. - Internal changes for
build_test.
- Add AOT compilation of builders. A future release will AOT compile builders
automatically, for this release it's behind a flag. AOT compiled builders
start up faster and have higher throughput, for faster builds overall.
Builders that use
-
2.9.001 Oct 2025Release notes
Open source →- Watch mode: handle builder config changes without recompiling or exiting.
- Remove log output about
build_runnerinternals. - Print the port that gets picked if you pass 0 for a port number, for example
with
dart run build_runner serve web:0. - Improve warnings when an option is specified for an unknown builder.
- Rewrite bootstrap code to remove use of
dart:mirrors. - Bug fix: require
args2.5.0.
-
2.8.005 Sep 2025Release notes
Open source →- Make errors more prominent in log output, highlight in red.
- Remove "deleting declared outputs" warning.
- Bug fix: fix incorrect display of some "usage" messages.
- Move code from
build_resolversintobuild_runner. - Move code from
build_runner_coreintobuild_runner. - Move code from
timingintobuild_runner. - Remove unused deps:
build_resolvers,build_runner_core,timing.
-
2.7.202 Sep 2025 -
2.7.102 Sep 2025Release notes
Open source →- Bug fix: with
build_runner serve, special handling of paths containing/packages/was hiding actual folders calledpackages. Serve the actual folders first, before trying the package lookup. - Remove undocumented / unused features:
lib/build_script_generate.dart,bin/graph_inspector.dart,build_runner doctorandbuild_runner generate-build-scriptcommands. - Remove deps on
pubspec_parseandtiming. - Use
build3.1.0.
- Bug fix: with
-
2.7.015 Aug 2025Release notes
Open source →- Performance: builders can choose to run only when "triggered". A builder runs
only if triggered if the option
run_only_if_triggeredistrue. Triggers are configured in new a top-level section ofbuild.yamlcalledtriggers. See thebuild_configdocs for more information. - Remove interactive prompts for whether to delete files.
- Ignore
-dflag: always delete files as if-dwas passed. - Remove
--use-polling-watcherflag. - Remove
build_runner servemode$graphand$perfhandlers. - Documentation revamp.
- Bug fix: delete transitive generated outputs as well as direct generated outputs. So, a generated file now gets deleted if its input was a generated file that is no longer output.
- Bug fix: fix crash creating a merged output dir with a file called
lib.
- Performance: builders can choose to run only when "triggered". A builder runs
only if triggered if the option
-
2.6.107 Aug 2025 -
2.6.017 Jul 2025Release notes
Open source →- Remove unused deps:
analyzer,build_resolvers,collection,http,js,meta,package_config,pool,web,yaml. - Remove unused dev_deps:
http,package_config,web. - Testing: read build configs using
AssetReaderso they're easier to test. - Use
build3.0.0. - Use
build_resolvers3.0.0.
- Remove unused deps:
-
2.6.0-dev.216 Jul 2025 pre-releaseRelease notes
Open source →- Remove unused deps:
analyzer,build_resolvers,collection,http,js,meta,package_config,pool,web,yaml. - Remove unused dev_deps:
http,package_config,web. - Testing: read build configs using
AssetReaderso they're easier to test.
- Remove unused deps:
-
2.6.0-dev.124 Jun 2025 pre-release -
2.5.423 Jun 2025Release notes
Open source →- Bug fix: fix incremental build when previous build had
package:import of a missing dep or a missing file.
- Bug fix: fix incremental build when previous build had
-
2.5.320 Jun 2025Release notes
Open source →- Bug fix: fix corner case with checked in generated output that could cause a crash.
- Bug fix: during initial build cleanup, really delete files that correspond to hidden generated files.
-
2.5.218 Jun 2025 -
2.5.117 Jun 2025Release notes
Open source →- Don't log stack traces for subclasses of
Exception. - Bug fix: don't run builders with multiple outputs once per output.
- Don't log stack traces for subclasses of
-
2.5.016 Jun 2025Release notes
Open source →User-visible changes:
- Improved performance for large builds. More performance improvements
will follow, if your workflow is affected by slow
build_runnerperformance then please consider sharing details at https://github.com/dart-lang/build/discussions. - Improved logging: show what builders are running and, for long-running builders, where the time is spent.
Versions:
- Bump the min SDK to 3.7.0.
- Use
build_test3.0.0. - Use
build_runner_core9.0.0.
Internal changes:
- Start using `package:build/src/internal.dart'.
- Refactor
MultiPackageAssetReaderto internalAssetFinder. FinalizedReaderno longer implementsAssetReader.- Refactor
CachingAssetReadertoFilesystemCache. - Refactor
FileBasedAssetReaderandFileBasedAssetWritertoReaderWriter. - Remove
OnDeleteWriter, add functionality toReaderWriter. - Add
NodeTypetoAssetNode, remove subtypes. Make mutations explicit. - Use
built_valueforAssetNodeand related types. - Add details of what changed and what is built to
--verboselogging. - Compute outputs as needed instead of storing them in the asset graph.
- Refactor invalidation to track current build progress in
Buildinstead of in the asset graph. - Remove
completeBuildfromRunnerAssetWriteras it's no longer needed.
- Improved performance for large builds. More performance improvements
will follow, if your workflow is affected by slow
-
2.4.1511 Feb 2025Release notes
Open source →- Update to package:web and dart:js_interop.
- Support the latest
package:shelf_web_socket. - Add hidden
--use-experimental-resolverflag for issue #3811 performance work. This flag will be removed.
-
2.4.1416 Dec 2024Release notes
Open source →- Write generated assets at the end of a build to avoid invalidating other tools with a file watcher multiple times.
- Bump the min sdk to 3.6.0.
- Allow analyzer version 7.x.
- Hard code the generated build script to language version 3.6.
- Allow dart_style version 4.0.0, require at least 2.3.7.
-
2.4.1330 Sep 2024Release notes
Open source →- Bump the min sdk to 3.5.0.
- Bump the
mimedependency to allow version 2.x.
-
2.4.1230 Jul 2024Release notes
Open source →- Bump the min sdk to 3.5.0-259.0.dev.
- Fix watch mode for workspace repos.
-
2.4.1105 Jun 2024Release notes
Open source →- Explicitly pass the current isolates package config instead of assuming the location, to support the upcoming pub workspaces feature.
-
2.4.1015 May 2024Release notes
Open source →- Support version
1.xand2.xofshelf_web_socketand2.xand3.x - of
web_socket_channel. - Bump the min sdk to 3.4.0.
- Support version
-
2.4.928 Mar 2024 -
2.4.811 Jan 2024Release notes
Open source →- Update README.md to point to the FAQ and other docs.
- Print stack traces for
Errorsubtype exceptions in non-verbose mode. - Support latest version of
package:js.
-
2.4.728 Nov 2023Release notes
Open source →- Fix broken link in README.md.
- Bump the min sdk to 3.0.0.
- Add a warning to the
doctorcommand if abuild.ymlfile is found (instead of abuild.yamlfile).
-
2.4.629 Jun 2023 -
2.4.506 Jun 2023Release notes
Open source →- Fix a bug handling a builder which has a
required_inputthat matches it's own output.
- Fix a bug handling a builder which has a
-
2.4.413 May 2023Release notes
Open source →- Use a stable order for builders without an order defined by dependencies.
-
2.4.312 May 2023 -
2.4.209 May 2023 -
2.4.113 Mar 2023Release notes
Open source →- Mention --build-filter option in the README.
- Update to build_daemon 4.0.
- Support enabling experiments in build scripts.
-
2.4.018 Jan 2023Release notes
Open source →- Warn if a
package:builder import cannot be resolved and skip it, instead of creating an invalid build script or failing in other obscure ways. - Require Dart 3.0, drop support for unsound build scripts.
- Warn if a
-
2.3.316 Dec 2022 -
2.3.218 Oct 2022 -
2.3.118 Oct 2022 -
2.3.010 Oct 2022 -
2.2.113 Sep 2022Release notes
Open source →- Allow the latest
package:analyzer. - Stop ignoring the no_leading_underscores_for_library_prefixes lint in generated build scripts, code_builder now does this for you.
- Allow the latest
-
2.2.012 Jul 2022Release notes
Open source →- Support global 'runs_before' configuration for builders. This allows users to influence the ordering of builders in their build.
-
2.1.1116 May 2022Release notes
Open source →- Stop reading or requiring
.packagesfiles. - Use an explicit
dynamicgeneric type for collections in default builder options to reduce behavior differences between reading default options and user provided options.
- Stop reading or requiring
-
2.1.1015 Apr 2022 -
2.1.914 Apr 2022Release notes
Open source →- Fix up the formatting a bit for the error message that is logged when we get errors from the directory watcher.
- Ignore the no_leading_underscores_for_library_prefixes lint in the generated build script.
- Report changed assets when running as a deamon.
- Allow analyzer version 4.x.
-
2.1.814 Mar 2022