objectbox-dart icon indicating copy to clipboard operation
objectbox-dart copied to clipboard

Configuring build runner

Open Kanyade opened this issue 1 year ago • 3 comments

Hey there, I tried to limit the files scanned for code generation. Found no option in build.yaml.

Is this not supported or am I missing something?

Is there an existing issue?

  • Not an issue in itself.

Use case

  • Generating objectbox.g.dart

Proposed solution

  • Editing build.yaml can configure which files will be scanned, making build runner faster. E.g.:

Image

But this warns me that this is not a known Builder.

Kanyade avatar Feb 08 '25 16:02 Kanyade

When running the build runner with --verbose, found that it needs to be objectbox_generator:resolver.

Image

Perhaps this should have a section in README.md?

Kanyade avatar Feb 08 '25 18:02 Kanyade

Thanks for reporting! The generator package is open source, so you can inspect its build.yaml to find out the names.

But I guess it would not hurt to add the names and some common use cases (like the above, but also how to handle conflicting builders, like #342) to its README or maybe the Advanced Setup page.

greenrobot-team avatar Feb 10 '25 07:02 greenrobot-team

Hi! I noticed this documentation issue and would like to contribute a fix. I'm new to open source contributions, so please let me know if this issue is still available to work on. Thanks!

Ghoulayush avatar Jun 25 '25 03:06 Ghoulayush