Skip to content

Getting a list of all modules defined in the build script #2690

Answered by lefou
hmf asked this question in Q&A
Discussion options

You must be logged in to vote

You get get the direct module children with millModuleDirectChildren. To get a recursive list, you can use millInternal.modules.

We use this in our own build too, e.g. to collect all example build and render them in the documentation.

mill/build.sc

Lines 999 to 1000 in c75e29c

def exampleModules: Seq[ExampleCrossModule] =
millInternal.modules.collect { case m: ExampleCrossModule => m }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hmf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants