forceAlwaysRun property

bool forceAlwaysRun
final

If true, the annotated file will be modified after code generation completes.

This is a workaround to ensure this library runs every time you execute the build_runner command.

Why modify the file?

build_runner only processes files that have changed since the last run. By modifying the file, you force build_runner to recognize it as changed and re-run the generation process.

Note: Setting this to true can lead to merge conflicts in team environments, as each developer may end up modifying the annotated file.

This setting is different from skipIfSpecIsUnchanged, which only regenerates the client SDK if it detects changes in the OpenAPI specification.

Defaults to false.

Implementation

final bool forceAlwaysRun;