Created
July 13, 2017 02:21
-
-
Save LeifW/0155b0a16e8bf41f62c82ded3f4e62f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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. ¯_(ツ)_/¯