Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
jOOQ integration in a `build.sbt` file
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("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
You can’t perform that action at this time.