Leiningen project.clj is to define a var project , which is nothing more than a map with keys representing project parameters (this is an idiom in Clojure to use def [name] to create a var named [name], which is usually a map - the simplest but very useful data structure).
See defaults var in Leiningen 2 source code for default values.
With that said, before you call the defproject macro, you can do whatever you want in project.clj - it's a Clojure script, because your imagination (and getting to know Clojure) is just something that can limit you. In fact, you can do whatever you want with var after creating it. Think of a .clj project as a Clojure application to manage your project.
As an example, before profiles were introduced in Leiningen 2, there was a โtrickโ to have one var with common dependencies for dependencies: dependencies and dev-dependencies. Just to warn you again - Leiningen 2 is no longer needed as it offers a profile object. Read Testing your project for several versions of Clojure if you are interested in how it was in the past.
source share