Skip to content

Instantly share code, notes, and snippets.

@LeifW
Created July 13, 2017 02:21
Show Gist options
  • Select an option

  • Save LeifW/0155b0a16e8bf41f62c82ded3f4e62f4 to your computer and use it in GitHub Desktop.

Select an option

Save LeifW/0155b0a16e8bf41f62c82ded3f4e62f4 to your computer and use it in GitHub Desktop.
mappings in (Compile, packageBin) ++= Def.taskDyn {
val schemaFolder = (target in Compile).value / "generatedSchemas"
Def.task {
(run in Compile).toTask(" " + schemaFolder).value
schemaFolder.listFiles.toSeq map (f => f -> f.getName)
}
}.value
@LeifW
Copy link
Copy Markdown
Author

LeifW commented Jul 13, 2017

I don't know what's going on here other than "macro stuff is happening". I just copied from http://www.scala-sbt.org/0.13/docs/Howto-Dynamic-Task.html

When one thing depends on the value of another thing and some environmental stuff needs to be computed before that value exists, I usually call that a "Monad", but what do I know. ¯_(ツ)_/¯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment