pub repository
mirror.p-hatan.combuild_barback
0.5.0+4Utilities for translating between builders and transformers.
Readme
Build Status
build_barback
Allows wrapping up a Builder as a Transformer so that it can be run in pub
or vice-versa.
Using a Builder from Pub
Wrap the Builder instance with new BuilderTransformer(builder) and use it
like any other Transformer. The Builder used this way must follow the rules of
other Transformers, it cannot use inputs from outside the package where the
Transformer is specified in pubspec.yaml
Using an exisiting Transformer with package:build
Wrap the Transformer instance with new TransformerBuilder(transformer) and
run as any other Builder. The Transformer instance used this way must follow
the rules of other Builders:
- It cannot overwrite files it uses as inputs.
- It must know before building what the outputs will be (it must be a
DeclaringTransformer).
Features and bugs
Please file feature requests and bugs at the issue tracker.
Changelog
0.5.0+4
- Support
package:analyzer0.32.0.
0.5.0+3
- Support the latest
analyzerpackage.
0.5.0+2
- Update to
package:buildversion^0.12.0.
0.5.0+1
- Stop casting
BuildSteptoBuildStepImpland removesrcimport from package:build.
0.5.0
- Internally uses
AnalysisOptionswith the following changes:- Does not
preserveFunctionBodies. - Does
preserveComments(the default). - Uses
strongMode.
- Does not
This makes the resolver implementation identical to the experience using the bazel_codegen, but it is technically a breaking change if you relied on the current behavior.
0.4.0+2
TransformerAssetReader#findAssetsnow returns aStream<AssetId>to match the latestbuildpackage, but this isn't considered a breaking change since the api is unsupported and throws in this implementation.
0.4.0+1
- Use a single
ResourceManagerfor all calls torunBuilderinBuilderTransformer. This makesResources be shared across all build steps for a given package and Builder.
0.4.0
- Breaking: Resolver interface updated for breaking change in
package:buildv0.10.0
0.3.0
- Breaking
BuilderTransformeris now anAggregateTransformer. This should be transparent for most use cases but could have errors if an instance was assigned to a variable of typeTransformer. - Breaking
BuilderTransformerno longer accepts aResolversinstance, instead it will create and manage Resolvers on its own.
0.2.0
- Update to build 0.9.0
- Breaking
TransformerBuildermust be constructed with abuildExtensionconfiguration. Transformers wrapped as a builder must have outputs which vary only by input extension.
0.1.2
- Only use the global log from
build - Upgrade to build 0.8.0
0.1.1
- Support the global log from
build
0.1.0
Updated to reflect the new support for reading/writing as bytes in the build
package, and the removal of the Asset class.
New Features
BuilderTransformernow supports wrapping transformers that read or write their inputs as bytes.- The Resolver implementation now has
isLibraryto check whether an Asset is a Library and throws an exception rather than returns null ongetLibrarywhen it isn't
Breaking Changes
- Stopped exporting
lib/src/util/barback.dartwhich contains internal only utilities. Specifically, the following items are no longer public (some are deleted entirely or had breaking changes as well):toBarbackAssettoBarbackAssetIdtoBarbackTransformtoBuildAssettoBuildAssetIdtoTransformLoggerBuildStepTransform
0.0.3
- Prevent asset writing from escaping beyond the
complete()call in BuildStepImpl
0.0.2
- Fix a bug forwarding logs from a
BuilderTransformer
0.0.1
- Initial separate release - split off from
buildpackage.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add build_barbackpubspec.yaml
name: build_barback
version: 0.5.0+4
description: Utilities for translating between builders and transformers.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/build/tree/master/build_barback
environment:
sdk: '>=2.0.0-dev.9 <2.0.0'
dependencies:
analyzer: ">=0.27.1 <0.33.0"
barback: ^0.15.0
build: ^0.12.0
code_transformers: ">=0.5.1 <0.6.0"
glob: ^1.1.0
graphs: ^0.1.0
logging: ^0.11.2
dev_dependencies:
build_test: ^0.10.0
test: ^0.12.0
transformer_test: ^0.2.1
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.0.1 | 2016-11-28T23:56:18.031Z | Download | dfb8cfdb3dc63abfcba9613c9f1d18a31e7722ec6a7267468713c93d28f407c3 |
| 0.0.2 | 2016-12-02T20:32:35.851Z | Download | 646d02f140633293881adefd0a30330109f5cced190828a839faa12f2d3fef1c |
| 0.0.3 | 2016-12-09T17:54:17.623Z | Download | 6b532f2f34a230604c7a772caca258d4e03d0fbe9861a4e0596ea01f633c3bd0 |
| 0.1.0 | 2017-01-27T21:27:00.569Z | Download | dceb9fa012d298f0602167870fdfb772744bc0ca658af6b3ada599c2e96ebec2 |
| 0.1.1 | 2017-02-11T00:36:27.066Z | Download | 1c9fd2c3c1ec7b084a049f2e379ff65102bfd45901d5415a90a4368aeeb2a687 |
| 0.1.2 | 2017-04-13T21:59:03.231310Z | Download | c7e47fecdfe4d5dd3d7f3d5648c7c66ba7a2b0f292efeb5a3a7397bd5d007b33 |
| 0.2.0 | 2017-04-25T18:03:29.380313Z | Download | 0726479cfb53ce11200a7b6bef4b49e29fca6e35b7b07299c58d524253964cb7 |
| 0.2.2 | 2017-05-04T20:55:03.963285Z | Download | 81f271249b376bb6e248c46659dec4ae9b2dca0d6a232fe8cc1e6ba6cbe45118 |
| 0.3.0 | 2017-07-18T05:05:57.271083Z | Download | 15c8f33e3afec1506d18b03c1d63b37edc7cb09379d43e2481c5b4d5f585c540 |
| 0.4.0 | 2017-08-14T17:47:29.683740Z | Download | 5317d9657574d7483a85182a0618acc1b72812b5a52e9ffd2bea1574c1dcf4e8 |
| 0.4.0+1 | 2017-09-21T22:03:18.435483Z | Download | b96fc39506a8b1ec17b6f2ce49e32af29bd6cc5c34f27fadf1aacd4f2a502958 |
| 0.4.0+2 | 2017-11-02T21:15:17.932900Z | Download | 88ffd1473d81deb7217b9fa224b5c4932ec907c4c6e6d6e67e8dbfffe91baea4 |
| 0.5.0 | 2017-12-07T22:11:40.799897Z | Download | 46657a87cd813aa0c719b684bf42b1967de2a336b2793097802a470f932e6210 |
| 0.5.0+1 | 2018-01-02T17:03:42.932315Z | Download | 19f8dbe05306df69539ea2125f5c9cd669345666766ac3d59b4a87bf781eab9d |
| 0.5.0+2 | 2018-01-18T22:14:12.922248Z | Download | 11a779f3903a7cdc1f03c3020b4ee7e740c6faede750e39e890319a7f3391b3b |
| 0.5.0+3 | 2018-02-03T00:27:00.495611Z | Download | 8704f76228bcd25a3bbb6f206ef5c45fb917162b0e3ae25e256b0257a2b29c6d |
| 0.5.0+4 | 2018-05-14T23:57:54.621368Z | Download | c74c9ec33b6fa26671195d0afcef02a1d9262d52ddc9ed10b19c1ad6d2d8bffd |
Dependencies
analyzer "\u003e=0.27.1 \u003c0.33.0"
barback "^0.15.0"
build "^0.12.0"
code_transformers "\u003e=0.5.1 \u003c0.6.0"
glob "^1.1.0"
graphs "^0.1.0"
logging "^0.11.2"