Skip to content

Instantly share code, notes, and snippets.

@moccos
Last active August 29, 2015 14:26
Show Gist options
  • Save moccos/5b252e471ab9ae7be40a to your computer and use it in GitHub Desktop.
Save moccos/5b252e471ab9ae7be40a to your computer and use it in GitHub Desktop.
run scalikejdbcGenAllForce before compile
lazy val removeTestTask = TaskKey[Unit]("removeTest", "Deletes scalikeJDBC test file")
removeTestTask := {
println("remove test files.")
sbt.IO.delete(new File("src/test/scala/path/to/generated/code"))
}
compile in Compile <<= (compile in Compile).dependsOn(removeTestTask)
scalikejdbcSettings
compile in Compile <<= (compile in Compile).dependsOn(scalikejdbc.mapper.SbtKeys.scalikejdbcGenAllForce.in(Compile).toTask(""))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment