Created
May 7, 2015 06:06
-
-
Save manuelbernhardt/09cbfa52e466d0cd7ae1 to your computer and use it in GitHub Desktop.
jOOQ integration in a `build.sbt` file
This file contains 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
libraryDependencies ++= Seq( | |
"org.jooq" % "jooq" % "3.6.0", | |
"org.jooq" % "jooq-codegen-maven" % "3.6.0", | |
"org.jooq" % "jooq-meta" % "3.6.0" | |
) | |
val generateJOOQ = taskKey[Seq[File]]("Generate JooQ classes") | |
val generateJOOQTask = (sourceManaged, dependencyClasspath in Compile, runner in Compile, streams) map { (src, cp, r, s) => | |
toError(r.run("org.jooq.util.GenerationTool", cp.files, Array("conf/authentication.xml"), s.log)) | |
((src / "main/generated") ** "*.scala").get | |
} | |
generateJOOQ <<= generateJOOQTask | |
sourceGenerators in Compile <+= generateJOOQTask |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment