4

I'm on a Flutter project and we are using build_runner.

We are using several builders and runnning all of them takes a long time. Our file looks like this:

targets:
  $default:
    builders:
      package1|builder1:
        # ... options package1
      package2|builder2:
        # ... options package2
      package3|builder3:
        # ... options package3

      # ... A bunch of other packages

      packageN|builderN:
        # ... options packageN

Now let's say I applied some changes in the project and I need to run the builders. But I know, only some builders need to be run and not the others (let's say builder2 and builder3).

Right now, when I run

flutter pub run build_runner build --delete-conflicting-outputs

It is running all the builders and it takes a very long time.


Is there a way to run specific builders with a command line?

Valentin Vignal
  • 6,151
  • 2
  • 33
  • 73
  • 1
    You mean disable all by default and only enable the ones you specify? All I've seen is this answer: https://stackoverflow.com/a/72879685/5881647 – JJ Du Plessis Nov 28 '22 at 09:39

0 Answers0