sbt - How to execute task that calls clean on subprojects without using aggregation? -



sbt - How to execute task that calls clean on subprojects without using aggregation? -

i want create take cleanall executes clean task on number of subprojects. don't want utilize aggregation sake of clean.

we've run issues play's asset routes when we've been using submodules.

it's documented how create new task, how phone call task on subproject?

based on illustration jacek laskowski i've come next plugin should placed in /project folder:

import sbt._ import sbt.autoplugin import sbt.keys._ import sbt.plugins.jvmplugin object cleanallplugin extends autoplugin { val cleanall = taskkey[unit]("cleans projects in build, regardless of dependencies") override def requires = jvmplugin override def projectsettings = seq( cleanalltask ) def cleanalltask = cleanall := def.taskdyn { val allprojects = scopefilter(inanyproject) clean.all(allprojects) }.value }

the plugin can added root project usage:

val main = project("root", file(".")) .enableplugins(cleanallplugin)

it can executed in sbt calling: cleanall

sbt

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -