Milad-Akarie / auto_route_library

Flutter route generator
MIT License
1.58k stars 402 forks source link

Changing build configuration generated file locations #1791

Open developer82 opened 11 months ago

developer82 commented 11 months ago

I'm trying to make the build script generate the part build files in a different location (as I do for freezed and riverpod). The following is my build.yaml:

targets:
  $default:
    builders:
      source_gen|combining_builder:
        generate_for:
          - lib/**.dart
        options:
          build_extensions:
            '^lib/{{}}.dart': 'lib/.generated/{{}}.g.dart'
      freezed|freezed:
        enabled: true
        options:
          build_extensions:
            '^lib/{{}}.dart': 'lib/.generated/{{}}.freezed.dart'
      auto_route_generator:auto_router_generator:
        enabled: true
        options:
          build_extensions:
            '^lib/{{}}.dart': 'lib/.generated/{{}}.gr.dart'

I'm getting the following error:

[INFO] Generating build script completed, took 215ms
[SEVERE]
Invalid argument(s): Configured build_extensions should be a map from inputs to outputs.

Even if I change the configuration line for the generator to auto_route_generator|auto_router_generator: as it is for other builders.

What am I missing?

khsuzan commented 4 months ago

did you get any solution for it?

developer82 commented 4 months ago

Sadly no