build
A package for authoring build_runner compatible code generators.
4.0.10
6.3M downloads/mo
#114 most downloaded on pub.dev
dart-lang/build
What this package is like to depend on
Last release 24 days ago
31 Jul 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 105 of 108 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
110 releases · first in 2016
12 releases in the last 12 months
see the full history below
Release timeline
110 releases · Jan 2016 to Jul 2026Releases
latest 60 of 110-
4.0.1031 Jul 2026 -
4.0.927 Jul 2026Release notes
Open source →AssetIdnow validates package names in addition to paths.- Bug fix: more strictly prohibit absolute paths in
AssetIdpath validation.
Release notes
Open source →AssetIdnow validates package names in addition to paths.- Bug fix: more strictly prohibit absolute paths in
AssetIdpath validation.
-
4.0.813 Jul 2026 -
4.0.708 Jul 2026Release notes
Open source →- Replace
Builderextension methodhasOutputForwithmatchesInput. DeprecatehasOutputFor. The newmatchesInputis identical, but now that zero-output builders are supported the old name is misleading. - Require Dart 3.8.0.
- Replace
-
4.0.627 Apr 2026 -
4.0.520 Mar 2026 -
4.0.413 Jan 2026 -
4.0.319 Nov 2025 -
4.0.208 Oct 2025Release notes
Open source →- Require
analyzer8.0.0. Remove use of deprecatedanalyzermembers, use their recommended and compatible replacements.
- Require
-
4.0.101 Oct 2025 -
4.0.002 Sep 2025Release notes
Open source →- Remove methods and classes deprecated in
4.0.0. - Make
AssetReader.digestabstract. - Remove unused deps:
async,build_runner_core,convert.
- Remove methods and classes deprecated in
-
3.1.002 Sep 2025Release notes
Open source →- Deprecate
runBuilder. It has been moved topackage:build_runner_coreand will be removed frompackage:build. Please note: the currently supported ways to run builders are usingbuild_runneron the command line orbuild_testin tests. If you need ongoing support for a different way to run builders please get in touch at https://github.com/dart-lang/build/discussions. - Deprecate
runPostProcessBuilder. LikerunBuilder, it has been moved topackage:build_runner_coreand will be removed frompackage:build. - Deprecate
AssetWriterSpy. It will be removed. - Deprecate
MultiplexingBuilder. It will be removed. - Use
build_runner_core9.3.1.
- Deprecate
-
3.0.215 Aug 2025 -
3.0.107 Aug 2025 -
3.0.017 Jul 2025Release notes
Open source →- Removed unused deps:
meta,pool. - Breaking: use the new
element2APIs inanalyzer. Builders that do resolution need to switch to the new API, see https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/doc/element_model_migration_guide.md. For questions please use https://github.com/dart-lang/build/discussions.
- Removed unused deps:
-
3.0.0-dev.216 Jul 2025 pre-release -
3.0.0-dev.124 Jun 2025 pre-releaseRelease notes
Open source →- Breaking: use the new
element2APIs inanalyzer. Builders that do resolution need to switch to the new API, see https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/doc/element_model_migration_guide.md. For questions please use https://github.com/dart-lang/build/discussions.
- Breaking: use the new
-
2.5.423 Jun 2025 -
2.5.320 Jun 2025 -
2.5.218 Jun 2025 -
2.5.117 Jun 2025 -
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.
AssetNotFoundExceptionnow also reports the missingpath.
Versions:
- Bump the min sdk to 3.7.0.
- Use
build_test3.0.0. - Use
build_runner_core9.0.0.
Internal changes:
- Add
package:build/src/internal.dartfor use bybuild_resolvers,build_runner_coreandbuild_test. - Refactor
PathProvidingAssetReadertoAssetPathProvider. - Refactor
MultiPackageAssetReaderto internalAssetFinder. - Add internal
Filesystemthat backsAssetReaderandAssetWriterimplementations. - Refactor
CachingAssetReadertoFilesystemCache. - Refactor
BuildCacheReadertoBuildCacheAssetPathProvider. - Refactor
FileBasedAssetReaderandFileBasedAssetWritertoReaderWriter. - Move
BuildStepImpltobuild_runner_core, useSingleStepReaderdirectly. - Add
LibraryCycleGraphLoaderfor loading transitive deps for analysis. - Track resolver dependencies as library cycle graphs.
- Ignore deprecated analyzer API usages.
- Improved performance for large builds. More performance improvements
will follow, if your workflow is affected by slow
-
2.4.216 Dec 2024Release notes
Open source →- Bump the min sdk to 3.6.0.
- Remove some unnecessary casts and non-null assertions now that we have private field promotion.
- Require analyzer ^6.9.0, allow <8.0.0.
- Fix analyzer deprecations.
-
2.4.129 Jun 2023 -
2.4.008 May 2023Release notes
Open source →- Add
BuildStep.packageConfiggetter to resolve a package config of all packages involved in the current build.
- Add
-
2.3.113 Sep 2022 -
2.3.015 Apr 2022Release notes
Open source →- Support ^ in build extensions that don't use capture groups, which results in full path matching instead of suffix matching.
-
2.2.214 Apr 2022 -
2.2.120 Dec 2021Release notes
Open source →- Fix a bug where builders were allowed to write to the same asset multiple times.
-
2.2.016 Dec 2021Release notes
Open source →- Allow reusing the values held by
Resources when the resource has adisposemethod. Previously the instances were discarded and recreated for every build even if they had tried to clean up their own state. - Allow the latest analyzer.
- Allow reusing the values held by
-
2.1.101 Oct 2021Release notes
Open source →- Throw an
ArgumentErrorif an expected output matches the input. - Bump min sdk to 2.14.0.
- Throw an
-
2.1.002 Aug 2021Release notes
Open source →- Expand the expressiveness of
buildExtensionsinclude capture groups, enabling directory moves. - Add an
allowedOutputsgetter toBuildStep. It returns assets that may be written in that step.
- Expand the expressiveness of
-
2.0.309 Jul 2021 -
2.0.227 May 2021 -
2.0.120 Apr 2021Release notes
Open source →- Require package:async version 2.5.0 and package:collection version 1.15.0.
-
2.0.012 Mar 2021Release notes
Open source →- Migrate to null-safety
- Breaking: Remove the deprecated
rootPackageargument torunBuilder - Breaking: Change the first argument to
AssetId.resolvefrom aString(which previously was required to be a valid URI) to aUriinstance. Call sites which have static errors can wrap the argument withUri.parse().
-
1.6.317 Feb 2021 -
1.6.201 Feb 2021 -
1.6.107 Jan 2021 -
1.6.015 Dec 2020Release notes
Open source →- Adds the
Future<AstNode> astNodeFor(Element, {bool resolve})api toResolverwhich provides a safe way of getting ast nodes (avoidingInconsistentAnalysisExceptions).
- Adds the
-
1.5.202 Dec 2020 -
1.5.118 Nov 2020Release notes
Open source →- Expose a set of valid inputs in
InvalidInputException. AssetReaderimplementations are now expected to throwInvalidInputExceptions when reading invalid inputs. The check has been removed from the build step implementation.
- Expose a set of valid inputs in
-
1.5.022 Sep 2020Release notes
Open source →- Allow the latest analyzer version
0.40.x. - Added the
Future<CompilationUnit> compilationUnitFor(AssetId id)api to theResolverclass, which returns only the parsed AST for the given asset.- Much cheaper than
libraryFor, because it only reads the given asset instead of touching all transitive deps. - Still may be suitable for some builders which don't need the fully resolved
Elementmodel.
- Much cheaper than
- Allow the latest analyzer version
-
1.4.009 Sep 2020Release notes
Open source →The resolver will now throw an
SyntaxErrorInAssetExceptionwhen attempting to resolve an asset with syntax errors. You can opt-out of this new behavior by passingallowSyntaxErrors: truetolibraryFor. -
1.3.011 May 2020Release notes
Open source →Added a new experiments library which exposes a list of language experiments through a Zone variable. This should only be used by builders which are invoking compilers or some other tool and need to pass on the language experiments.
-
1.2.215 Nov 2019Release notes
Open source →Updated docs for some minor behavior changes in build_resolvers 1.3.0
Resolver.librarieswill now return any library that has been resolved with this resolver. This means calls tolibraryFororisLibraryon files not already resolved will make subsequentlibrariesstreams return more libraries than previous calls did.- The same holds for
findLibraryByNamesince it searches through thelibrariesstream. You may get a different result at different points in your build method if you resolve additional libraries.
-
1.2.128 Oct 2019 -
1.2.020 Sep 2019Release notes
Open source →- Add the
void reportUnusedAssets(Iterable<AssetId> ids)method to theBuildStepclass.- WARNING: Using this introduces serious risk of non-hermetic builds.
- Indicates to the build system that
idswere read but their content has no impact on the outputs of the build. - Build system implementations can choose to support this feature or not, and it should be assumed to be a no-op by default.
- Add the
-
1.1.616 Aug 2019 -
1.1.515 Jul 2019 -
1.1.426 Apr 2019Release notes
Open source →- Internal cleanup: use "strict raw types".
- Some return types for interfaces to implement changed from
Future<dynamic>toFuture<void>.
-
1.1.304 Apr 2019Release notes
Open source →- Update the minimum sdk constraint to 2.1.0.
- Increased the upper bound for
package:analyzerto<0.37.0.
-
1.1.226 Mar 2019 -
1.1.131 Jan 2019Release notes
Open source →- Requires analyzer version
0.35.0Resolverimplementations in other packages are now backed by anAnalysisDriver. There are behavior changes which may be breaking. TheLibraryElementinstances returned by the resolver will now:- Have non-working
contextfields. - Have no source offsets for annotations or their errors.
- Have working
sessionfields. - Have
Sourceinstances with different URIs than before.
- Have non-working
- Requires analyzer version
-
1.1.014 Jan 2019Release notes
Open source →- Add
Resolver.assetIdForElementAPI. This allows finding the Dart source asset which contains the definition of an element found through the analyzer. - Include the AssetId hash code in the default digest implementation.
- Any custom implementations of the
AssetReader.digestmethod should do the same, and a comment has been added to that effect.
- Any custom implementations of the
- Add
-
1.0.205 Dec 2018 -
1.0.108 Oct 2018 -
1.0.025 Sep 2018Release notes
Open source →Breaking Changes
- Changed the return type of
Builder.buildfromFuture<dynamic>toFutureOr<void>. This should not be breaking for mostBuilderauthors, it is only breaking for build system implementations that runBuilders.
- Changed the return type of
-
0.12.824 Sep 2018Release notes
Open source →- Added the
T trackStage<T>(String label, T Function() action);method toBuildStep. Actions that are tracked in this way will show up in the performance timeline at/$perf.
- Added the
-
0.12.721 Jun 2018