Actually, the project.clj file is evaluated by Leiningen using the
ordinary Clojure evaluator. This means that you can put arbitrary code
at the top level of the file to, for example, extract the keys from
environment variables. Any dev-dependencies will be available in this
Leiningen JVM instance too.
'defproject' is a macro, so its contents is not evaluated the usual
way. But it does have a helpful feature: Unquoted forms will be
evaluated with normal Clojure rules, so it's possible to do something
like this:
(def access-key ...)
(def secret-key ...)
(defproject foo 1.0.0
...the usual stuff...
:aws {:access-key ~access-key
:secret-key ~secret-key}
You can of course write the whole expressions directly after the
tildes, but I wanted to demonstrate the possibility of using def here.
Hope this helps!
// Rasmus Svensson (raek)