diff options
author | Stewart Stewart <stewinsalot@gmail.com> | 2016-09-09 14:32:07 -0400 |
---|---|---|
committer | Stewart Stewart <stewinsalot@gmail.com> | 2016-09-09 14:32:07 -0400 |
commit | b70191412c26212fddca06b23d70a6d467e1ff7c (patch) | |
tree | 3b6eb54f4b1e90265ebfd9e930518cdae71fc33c /src/main/scala | |
parent | f8d9124bbffab3f3b020a90482fe9a7207159631 (diff) | |
download | slick-codegen-plugin-b70191412c26212fddca06b23d70a6d467e1ff7c.tar.gz slick-codegen-plugin-b70191412c26212fddca06b23d70a6d467e1ff7c.tar.bz2 slick-codegen-plugin-b70191412c26212fddca06b23d70a6d467e1ff7c.zip |
move URI to SettingKey
Diffstat (limited to 'src/main/scala')
-rw-r--r-- | src/main/scala/CodegenPlugin.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/scala/CodegenPlugin.scala b/src/main/scala/CodegenPlugin.scala index f8b039a..895e674 100644 --- a/src/main/scala/CodegenPlugin.scala +++ b/src/main/scala/CodegenPlugin.scala @@ -6,6 +6,7 @@ object CodegenPlugin extends AutoPlugin { override def requires = sbt.plugins.JvmPlugin object autoImport { lazy val genTables = TaskKey[Seq[File]]("gen-tables") + lazy val dbConfigURI = SettingKey[String]("uri for the database configuration") lazy val pkg = SettingKey[String]("package in which to place generated code") lazy val tablesFilename = SettingKey[String]("path for slick table models") lazy val rowsFilename = SettingKey[String]("path for row case classes") @@ -13,7 +14,7 @@ object CodegenPlugin extends AutoPlugin { lazy val slickCodeGenTask = Def.task { val schemas = "patients,portal,work_queues,confidential,case_accessioning,samples.samples,samples.subsamples,samples.shipment_preps,samples.collection_methods,experiments.experiments,experiments.exp_types,experiments.somatic_snvs_indels_filtered,samples.basic_diagnosis,samples.molecular_tests,samples.sample_pathology,samples.path_molecular_tests" - val uri = new java.net.URI("file:src/main/resources/application.conf#slick.db.default") + val uri = new java.net.URI(dbConfigURI.value) codegen.NamespacedCodegen.run(uri, pkg.value, tablesFilename.value, rowsFilename.value, schemas) |