Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.14 KB

UPGRADE.md

File metadata and controls

40 lines (31 loc) · 1.14 KB

Upgrade from v3 to v4

@Parameter annotation removed

The @Parameter('name') annotation was removed. You can use @Inject(parameter: 'name') instead.

A simple replace-all @Parameter( with @Inject(parameter: should fix your code.

Upgrade from v2 to v3

Changes in build.yaml

The options preflightExtension and outputName has been removed.

# build.yaml
targets:
  $default:
    auto_apply_builders: true
    builders:
      catalyst_builder|preflight:
        options:
-           preflightExtension: '.catalyst_builder.preflight.json'
      catalyst_builder|buildServiceProvider:
        options:
            providerClassName: 'ExampleProvider'
-           outputName: 'src/example.container.dart'
            includePackageDependencies: true

To generate the service provider you've to use the new @GenerateServiceProvider annotation. This annotation will create a *.example.catalyst_builder.g.dart when running the build runner.

 import 'package:catalyst_builder/catalyst_builder.dart';
-import './src/example.container.dart';
+import 'example.catalyst_builder.g.dart';

+@GenerateServiceProvider()
 void main() {}