1

I want a setting to depend on settings of a dynamic list of other projects (well, executed at SBT setting start up, but dynamic in the sense that it is not hard-coded).

I have Def.dynTask to produce a task with a dynamic dependency on other tasks.

Is there a similar way to do this for settings, i.e. produce a setting with a dynamic dependency on other settings?


Or perhaps I misunderstand settings. FYI, my understanding is that settings are computed once at start up; tasks are computed whenever they are requested.

Paul Draper
  • 78,542
  • 46
  • 206
  • 285

1 Answers1

0

Setting is actually initialized only one per sbt session. The good explanation about that can be found here

If I got your idea in right way, you can do that with TaskKeys and the sbt.Extracted.append method. Be careful, I have faced strange think like this

Community
  • 1
  • 1
Barys
  • 61
  • 5
  • 1
    Barys, right. I know that they are computed once. But I wanted to know if they could be computed based on other settings, but the exact list wasn't known at compile time. – Paul Draper Mar 25 '15 at 16:48