How do I get all projects in an SBT task?
I am writing an SBT task that will get all the projects of the whole project, then I can do some tasks against them.
The pseudocode looks like this:
val projects = someTaskToGetProjects.value
val updateReports = projects.map(p => (update in p).value)
But I can't find any task or setting to get the list of projects, how to do this?
+3
source to share
1 answer
I think buildDependencies can meet your needs, otherwise loadedBuild has it all.
val projects = buildDependencies.value.classpath.keys
val updateReports = projects.map(p => (update in p).value)
0
source to share