Open larsjaas opened 5 years ago
Hi @larsjaas !
a couple of things to say, shocon
itself can be used without the sbt-plugin, what you need to do is to make the configuration files available before the compilation task starts (and macros are resolved).
An example of doing it is here:
https://github.com/akka-js/shocon/blob/master/build.sbt#L29
Other than that I think it's pretty straight forward to re-implement this logic ( https://github.com/akka-js/shocon/blob/master/plugin/src/main/scala/org/akkajs/shocon/sbtplugin/ShoconPlugin.scala#L83 ) in as a Mill task.
WDYT?
Yeah, I doubt it's very difficult, just wondered if I had overlooked a ready-made solution. I'll see what I figure out as I get more familiar with mill, and follow up in this thread if I produce anything that would be of interest to others.
great, thanks! :+1:
Made some progress. Got a working 'shoconConcat' target task hooked up, and I'm able to read config values in my project (didn't find the typesafe shim mentioned in the readme, but Config.fromFile() covered my needs). I still need to inject the task as a compile/run-dependency, and preferably also not have to specify the mill-specific full path of the generated shocon.conf file when reading the file.
Great to hear! I would love to have a PR with a Readme update about the process if you can!
I've ditched sbt for mill. I'm now wondering how to use shocon in a project, the shoconConcat-task in particular. Is mill supported? Will I need to keep a build.sbt file around for that purpose?