auto_route_library icon indicating copy to clipboard operation
auto_route_library copied to clipboard

Changing The Output Directory

Open alkebuware opened this issue 2 years ago • 0 comments

Hi Everyone,

Has anyone had success changing the output directory of auto_route's .gr.dart file. I'd like to keep all my generated files in a different part of the directory tree. I took a look at source_gen's README, and came up with the following changes to my build.yaml based on how source_gen|combining_builder works. But the .gr.dart always gets generated in the same directory as its annotation file.

targets:
  $default:
    builders:
      auto_route_generator|autoRouteGenerator:
        options:
          build_extensions:
            '^lib/{{}}.dart': 'lib/gen/{{}}.gr.dart'

alkebuware avatar Jun 12 '22 15:06 alkebuware