oyvindberg / bleep

A bleeping fast scala build tool!
MIT License
150 stars 23 forks source link

Script configuration #328

Open markehammons opened 1 year ago

markehammons commented 1 year ago

Right now, scripts in bleep are configured via Scala code, objects and such added as part of the build. For example, a publishLocal script you wrote for bleep uses a config object to determine if a project should be published or not.

I think a better option might end up being something similar to what is currently being done for test projects, a set of free-form config for each project. That would let scripts to be shared.

The yaml example for this might be something like this:

projects:
  my-project:
    options: 
      publishable: true

As a use-case, I want to write a script that generates code for jmh and runs jmh benchmarks. It would be cool to make said script shareable with other projects. In my own project, such a script would take a similar approach to your publishLocal script, having an object that tells whether a project is a benchmark project or not. With the proposed options field, I'd write:

project:
  my-bench-project:
    options:
      is-benchmark: true
oyvindberg commented 1 year ago

This is effectively #272. I think it's a good idea