2

Is it possible for an sbt plugin to hook into sbt's project loading mechanism, and alter the properties of the current root project further after it is processed?

In other words, automatically:

  1. Take the root project
  2. Transform it in some way. For example, with a call to dependsOn.
  3. Make the transformed project the new root project

An application for this would be to automatically check for a "checkouts" directory inside any loaded project's base directory, and call dependsOn for each directory inside it that is symlinked. (Similar to Leiningen's checkouts feature).

See Setting up sbt environment to hack on multiple libraries at once

I would like to write (or consume) a plugin that does this automatically, but first need to know if this is viable.

Community
  • 1
  • 1
kes
  • 5,983
  • 8
  • 41
  • 69

1 Answers1

2

Build Loaders are what provide the most flexibility in transforming builds, but are more advanced.

Mark Harrah
  • 6,999
  • 1
  • 26
  • 31