Skip to content

Commit b9b0934

Browse files
committed
dart-2-dev - update to new source gen and pull dev tag
1 parent 2acb06d commit b9b0934

12 files changed

+44
-77
lines changed

Diff for: CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 7.4.5
2+
3+
* open sdk range to dart 2!
4+
* update built_value and source_gen dependencies
5+
* use SharedPartBuilder rather than PartBuilder in the generator
16

27
## 7.4.4-dev
38

Diff for: README.md

-31
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,6 @@
33
[![Pub](https://img.shields.io/pub/v/built_redux.svg)](https://pub.dartlang.org/packages/built_redux)
44
[![codecov.io](http://codecov.io/github/davidmarne/built_redux/coverage.svg?branch=master)](http://codecov.io/github/davidmarne/built_redux?branch=master)
55

6-
## Developer branch
7-
8-
With the dev tag you can consume the latest versions of built_value, build, and build_runner that are only compatable with dart 2.
9-
10-
In order to migrate:
11-
12-
* remove your old build scripts
13-
* update your pubspec to include
14-
15-
```yaml
16-
dependencies:
17-
built_redux: 7.4.1-dev
18-
built_value: ^5.2.0
19-
dev_dependencies:
20-
build_runner: ^0.8.0
21-
built_value_generator: ^5.2.0
22-
```
23-
24-
* add a build.yaml to the root of your repo that contains the following:
25-
26-
```yaml
27-
targets:
28-
$default:
29-
builders:
30-
built_value_generator|built_value:
31-
enabled: false
32-
```
33-
346
----
357

368
built_redux is a state management library written in dart that enforces immutability.
@@ -40,9 +12,6 @@ Inspired by [redux][redux_git]
4012

4113
Built using [built_value][built_value_git]
4214

43-
## Using dart 2?
44-
Check out the [dart 2 dev branch](https://github.com/davidmarne/built_redux/tree/dart-2-dev), which works with the latest versions of build, build_runner, and built_value.
45-
4615
## Framework bindings
4716

4817
[flutter]

Diff for: build.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
targets:
22
$default:
33
builders:
4-
built_value_generator|built_value:
5-
enabled: false
64
built_redux|built_redux:
75
enabled: true
86

@@ -11,6 +9,7 @@ builders:
119
target: ":built_redux"
1210
import: "package:built_redux/builder.dart"
1311
builder_factories: ["builtRedux"]
14-
build_extensions: {".dart": ["g.dart"]}
12+
build_extensions: {".dart": [".built_redux.g.part"]}
1513
auto_apply: dependents
16-
build_to: source
14+
build_to: cache
15+
applies_builders: ["source_gen|combining_builder"]

Diff for: doc/basics/setup.md

+5-15
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,11 @@ built_value and built_redux both rely on build_runner for code generation.
66

77
```yaml
88
dependencies:
9-
built_redux: 7.4.0-dev
10-
built_value: ^5.2.0
9+
built_redux: ^7.4.5
10+
built_value: '>=5.5.5 <7.0.0'
1111
dev_dependencies:
12-
build_runner: ^0.7.9
13-
built_value_generator: ^5.2.0
12+
build_runner: ^0.9.0
13+
built_value_generator: ^6.0.0
1414
```
1515
16-
2. add a build.yaml to the root of your repo that contains the following:
17-
18-
```yaml
19-
targets:
20-
$default:
21-
builders:
22-
built_value_generator|built_value:
23-
enabled: false
24-
```
25-
26-
3. Use build runner to build the generated files by executing `pub run build_runner build`
16+
2. Use build runner to build the generated files by executing `pub run build_runner build`

Diff for: example/example.g.dart

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: lib/builder.dart

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import 'package:build/build.dart';
22
import 'package:source_gen/source_gen.dart';
3-
import 'package:built_value_generator/built_value_generator.dart';
43

54
import 'generator.dart';
65

7-
Builder builtRedux(BuilderOptions options) => new PartBuilder([
6+
Builder builtRedux(BuilderOptions _) => new SharedPartBuilder([
87
new BuiltReduxGenerator(),
9-
new BuiltValueGenerator(),
10-
],
11-
generatedExtension: '.g.dart',
12-
header: options.config['header'] as String);
8+
], 'built_redux');

Diff for: pubspec.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: built_redux
2-
version: 7.4.4-dev
2+
version: 7.4.5
33
description:
44
A state management library written in dart that enforces immutability
55
authors:
66
- David Marne <[email protected]>
77
homepage: https://github.com/davidmarne/built_redux
88
dependencies:
9-
analyzer: '>=0.29.0 <0.33.0'
9+
analyzer: ^0.32.1
1010
build: ^0.12.0
11-
built_collection: '>=1.0.0 <4.0.0'
12-
built_value: ^5.2.0
13-
built_value_generator: ^5.2.0
14-
source_gen: '>=0.7.0 <0.9.0'
11+
built_collection: '>=2.0.0 <4.0.0'
12+
built_value: '>=5.5.5 <7.0.0'
13+
source_gen: ^0.9.0
1514
test: '>=0.12.0 <2.0.0'
1615

1716
dev_dependencies:
18-
build_runner: ^0.9.0
19-
build_test: ^0.10.0
17+
build_runner: ^0.10.0
18+
build_test: ^0.10.0
19+
built_value_generator: ^6.0.0
2020
build_web_compilers: ^0.4.0
2121

2222
environment:
23-
sdk: '>=2-0-0-dev <2.0.0'
23+
sdk: '>=2.0.0-dev <3.0.0'

Diff for: test/unit/action_generics_models.g.dart

+10-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: test/unit/collection_models.g.dart

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: test/unit/inheritance_test_models.g.dart

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: test/unit/nested_models.g.dart

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: test/unit/test_counter.g.dart

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)