From 2dc343fac9da8234d66ec522b68f03095f3e5d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sakib=20Had=C5=BEiavdi=C4=87?= Date: Wed, 18 Sep 2024 21:37:35 +0200 Subject: [PATCH] Add squery mill plugin (#3581) Closes https://github.com/sake92/squery/issues/9 --- .../ROOT/pages/Thirdparty_Plugins.adoc | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/modules/ROOT/pages/Thirdparty_Plugins.adoc b/docs/modules/ROOT/pages/Thirdparty_Plugins.adoc index edd67ef6dd5..01e672876d4 100644 --- a/docs/modules/ROOT/pages/Thirdparty_Plugins.adoc +++ b/docs/modules/ROOT/pages/Thirdparty_Plugins.adoc @@ -1043,6 +1043,39 @@ object app extends MavenModule with SpringBootModule { $ mill app.springBootAssembly ---- + +== Squery + +Source code generator for https://github.com/sake92/squery/[Squery] SQL library boilerplate. + +Project home: https://github.com/sake92/squery + +[source,scala,subs="attributes,verbatim"] +---- +import $ivy.`ba.sake::mill-squery-generator_mill0.11:0.6.2` +import mill._ +import mill.scalalib._ +import ba.sake.squery.generator._ +import ba.sake.squery.generator.mill.SqueryGeneratorModule + +object app extends ScalaModule with SqueryGeneratorModule { + // use T.input(T.ctx.env("MY_ENV_VAR")) to set sensitive variables like password etc + def squeryJdbcUrl = "jdbc:..." + def squeryUsername = ".." + def squeryPassword = ".." + def squerySchemas = Seq("myschema" -> "com.mypackage.myschema") + + // override to tweak codegen settings + def squeryGeneratorConfig: T[SqueryGeneratorConfig] = ... +---- + +[source,shell] +---- +# Generate source files +$ ./mill root.squeryGenerate +---- + + == Universal Packager Support universal archive packaging for Java application with Mill, ported from sbt-native-packager.