Skip to content
Julian Finkler edited this page Feb 23, 2025 · 2 revisions

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.

Cache directory

We did a rework of the building system. In the previous versions we had some issues with the change detection on builds. This problem was solved by replacing the build_runner cache handling with a custom caching mechanism.

For this, you should exclude the .catalyst_builder_cache directory from VCS.

Relative dependencies

The previously created relative_deps_exports.dart is not required anymore. Feel free to delete it.

Build configuration

We proudly announce that the initial setup of the catalyst_builder package is easier than before.

The package doesn't require you to have a custom build.yaml to customize the builder. To achieve customization you just need to move the options to the @GenerateServiceProvider annotation.

Before

# build.yaml before
targets:
  $default:
    auto_apply_builders: true
    builders:
      
      catalyst_builder|preflight:
        # ...
      catalyst_builder|buildServiceProvider:
        options:
          providerClassName: 'ExampleProvider'
          includePackageDependencies: true
// Your dart file
@GenerateServiceProvider()

After

# build.yaml after 
# Delete this file if it looks like this:
targets:
  $default:
    auto_apply_builders: true
// Your dart file

@GenerateServiceProvider(
  providerClassName: 'ExampleProvider',
  includePackageDependencies: true,
)

Clone this wiki locally