@@ -10,6 +10,7 @@ import 'package:build/src/builder/build_step.dart';
1010import 'package:build/src/builder/build_step_impl.dart' ;
1111import 'package:build_resolvers/build_resolvers.dart' ;
1212import 'package:build_test/build_test.dart' ;
13+ import 'package:package_config/package_config.dart' ;
1314import 'package:test/test.dart' ;
1415
1516void main () {
@@ -34,7 +35,7 @@ void main() {
3435 primary = makeAssetId ();
3536 outputs = List .generate (5 , (index) => makeAssetId ());
3637 buildStep = BuildStepImpl (primary, outputs, reader, writer,
37- AnalyzerResolvers (), resourceManager);
38+ AnalyzerResolvers (), resourceManager, _unsupported );
3839 });
3940
4041 test ('doesnt allow non-expected outputs' , () {
@@ -87,8 +88,15 @@ void main() {
8788 };
8889 addAssets (inputs, writer);
8990 var outputId = AssetId .parse ('$primary .copy' );
90- var buildStep = BuildStepImpl (primary, [outputId], reader, writer,
91- AnalyzerResolvers (), resourceManager);
91+ var buildStep = BuildStepImpl (
92+ primary,
93+ [outputId],
94+ reader,
95+ writer,
96+ AnalyzerResolvers (),
97+ resourceManager,
98+ _unsupported,
99+ );
92100
93101 await builder.build (buildStep);
94102 await buildStep.complete ();
@@ -112,8 +120,8 @@ void main() {
112120 addAssets (inputs, writer);
113121
114122 var primary = makeAssetId ('a|web/a.dart' );
115- var buildStep = BuildStepImpl (
116- primary, [], reader, writer, AnalyzerResolvers (), resourceManager);
123+ var buildStep = BuildStepImpl (primary, [], reader, writer,
124+ AnalyzerResolvers (), resourceManager, _unsupported );
117125 var resolver = buildStep.resolver;
118126
119127 var aLib = await resolver.libraryFor (primary);
@@ -143,7 +151,7 @@ void main() {
143151 outputId = makeAssetId ('a|test.txt' );
144152 outputContent = '$outputId ' ;
145153 buildStep = BuildStepImpl (primary, [outputId], StubAssetReader (),
146- assetWriter, AnalyzerResolvers (), resourceManager);
154+ assetWriter, AnalyzerResolvers (), resourceManager, _unsupported );
147155 });
148156
149157 test ('Completes only after writes finish' , () async {
@@ -191,7 +199,7 @@ void main() {
191199 primary = makeAssetId ();
192200 output = makeAssetId ();
193201 buildStep = BuildStepImpl (primary, [output], reader, writer,
194- AnalyzerResolvers (), resourceManager,
202+ AnalyzerResolvers (), resourceManager, _unsupported,
195203 stageTracker: NoOpStageTracker .instance);
196204 });
197205
@@ -205,8 +213,8 @@ void main() {
205213 var reader = StubAssetReader ();
206214 var writer = StubAssetWriter ();
207215 var unused = < AssetId > {};
208- var buildStep = BuildStepImpl (
209- makeAssetId (), [], reader, writer, AnalyzerResolvers (), resourceManager,
216+ var buildStep = BuildStepImpl (makeAssetId (), [], reader, writer,
217+ AnalyzerResolvers (), resourceManager, _unsupported ,
210218 reportUnusedAssets: unused.addAll);
211219 var reported = [
212220 makeAssetId (),
@@ -234,3 +242,7 @@ class SlowAssetWriter implements AssetWriter {
234242 {Encoding encoding = utf8}) =>
235243 _writeCompleter.future;
236244}
245+
246+ Future <PackageConfig > _unsupported () {
247+ return Future .error (UnsupportedError ('stub' ));
248+ }
0 commit comments