Fork me on GitHub

Hey! Is there a way to use git submodules as libraries in Lein project? IIUC, Lein checkouts just adds classpath to my project, but I want to use my library as fully-fledged library with it’s own dependencies, etc.


How often do the submodules change? Could you just use lein install?


I don’t think that often. You mean I just cd my-library; lein install?


Yeah, something like that. Would let you use your lib as a dependency locally


I wasn’t sure that it’s possible, after all, when I build my project, deps of library should somehow “be imported”. But if you say so, I’ll try it. Thanks!


It should import your lib if you build an uberjar


I am looking at the :scm option of lein projects and wondering about the nested :dir option

:scm {:name "git"
        :tag "098afd745bcd"
        :url ""
        ;; Allows you to use a repository in a different directory than the
        ;; project's root, for instance, if you had multiple projects in a
        ;; single git repository.
        :dir ".."}
I have a repo ‘matrix’ that includes both my JS and CLJS versions, where the home of the project.clj is matrix/cljs/matrix. I would try cljs/matrix as the :dir` but the example of ".." scares me. That is the parent of my project directory, in fact my home directory! Confused...


Hmmm, #cljdoc is back to complaining about no SCM information. Could someone familiar with leiningen fill me in on the :dir option to the :scm block? My situation is indeed unorthodox with the CLJS project as a (nested) subdirectory of the repo directory. Thx.


⬆️ resolved 🙂