Skip to content

Instantly share code, notes, and snippets.

@serioga
Last active January 4, 2024 13:51
Show Gist options
  • Save serioga/758b473527dd46c504cfcf278874e492 to your computer and use it in GitHub Desktop.
Save serioga/758b473527dd46c504cfcf278874e492 to your computer and use it in GitHub Desktop.
;; The deps.edn file describes the information needed to build a classpath.
;;
;; When using the `clojure` or `clj` script, there are several deps.edn files
;; that are combined:
;; - install-level
;; - user level (this file)
;; - project level (current directory when invoked)
;;
;; For all attributes other than :paths, these config files are merged left to right.
;; Only the last :paths is kept and others are dropped.
{
;; Paths
;; Directories in the current project to include in the classpath
;; :paths ["src"]
;; External dependencies
:deps {
#_#_org.clojure/clojure {:mvn/version "1.10.2"}
;; - see https://github.com/hugoduncan/criterium/
;; - (require '[criterium.core :refer [bench]])
;; - (bench (your-expression))
criterium/criterium {:mvn/version "RELEASE"}
;; https://github.com/weavejester/hashp
;; (require 'hashp.core)
hashp/hashp {:mvn/version "RELEASE"}
;; https://github.com/clojure-goes-fast/clj-java-decompiler
;; (require '[clj-java-decompiler.core :refer [decompile]])
com.clojure-goes-fast/clj-java-decompiler {:mvn/version "RELEASE"}
}
;; Aliases
;; resolve-deps aliases (-R) affect dependency resolution, options:
;; :extra-deps - specifies extra deps to add to :deps
;; :override-deps - specifies a coordinate to use instead of that in :deps
;; :default-deps - specifies a coordinate to use for a lib if one isn't found
;; make-classpath aliases (-C) affect the classpath generation, options:
;; :extra-paths - vector of additional paths to add to the classpath
;; :classpath-overrides - map of lib to path that overrides the result of resolving deps
:aliases {
;; :deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.9.863"}}}
;; :test {:extra-paths ["test"]}
;; - see https://nrepl.org/
;; - start a basic nREPL server on a random available port:
:nrepl {:extra-deps {nrepl/nrepl {:mvn/version "RELEASE"}}
:jvm-opts ["-Dlogback.configurationFile=c:\\Bin\\logback.xml"]
:main-opts [;; initialize hashp `#p`
-e "(require 'hashp.core)"
;; enable `tap>` as `#t` data reader
-e "(do (alter-var-root #'default-data-readers conj ['t (fn tap [form] `(doto ~form tap>))]) nil)"
;; start nREPL server
-m nrepl.cmdline --interactive]}
;; - report project dependencies that have newer versions available:
;; cd project-directory && clojure -T:search/outdated
;; - update library versions in this deps.edn file:
;; cd $XDG_CONFIG_HOME/clojure && clojure -T:search/outdated
:outdated
{:replace-paths ["."]
:replace-deps {com.github.liquidz/antq {:mvn/version "2.7.1133"}
org.slf4j/slf4j-nop {:mvn/version "2.0.9"}}
:exec-fn antq.tool/outdated
:exec-args {:directory ["."] ; default
:exclude ["org.clojure/tools.deps.alpha"
"org.clojure/clojurescript"]
;; :focus ["com.github.liquidz/antq"]
:skip ["boot" "leiningen"]
:reporter "table" ; json edn format
:verbose false
:upgrade false
:force false}}
}
;; Provider attributes
;; :mvn/repos {
;; "central" {:url "https://repo1.maven.org/maven2/"}
;; "clojars" {:url "https://repo.clojars.org/"}
;; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment