Skip to content

Migrate from Leiningen to tools.deps#391

Open
bbatsov wants to merge 7 commits intomasterfrom
migrate-to-tools-deps
Open

Migrate from Leiningen to tools.deps#391
bbatsov wants to merge 7 commits intomasterfrom
migrate-to-tools-deps

Conversation

@bbatsov
Copy link
Copy Markdown
Member

@bbatsov bbatsov commented Apr 15, 2026

Replaces Leiningen with tools.deps (Clojure CLI) for building, testing, and deploying orchard. Closes #262.

The project now uses deps.edn for dependency management, tools.build for Java compilation/JAR building/deployment, and the Clojure CLI for running tests and linters. The Clojure sources JAR (needed for tests, previously handled by lein's classifier support) is downloaded via curl since tools.deps doesn't support Maven classifiers natively.

Other changes:

  • CI Docker images switched from lein to tools-deps variants
  • Deploy now requires all test jobs to pass (including intermediate JDKs); I thought the old behavior was likely an oversight
  • Deploy runs on JDK 11 instead of 8 (tools.build requires 11+)

That's a potential first step towards switching the other projects we maintain to tools.deps as well.

bbatsov added 5 commits April 15, 2026 20:34
Foundation for the tools.deps migration:
- deps.edn with aliases for Clojure version testing, test runner,
  ClojureScript, linters, and tools.build
- build.clj with Java compilation, JAR building, install, and deploy
- .cljfmt.edn extracted from project.clj cljfmt config
All targets now use clojure/clj instead of lein. The Clojure
sources JAR (needed for tests) is downloaded via curl since
tools.deps doesn't support Maven classifiers.
- Use clojure:temurin-*-tools-deps-noble images
- Remove apt-get install (no longer needed)
- Cache .gitlibs for git deps
- Install Clojure CLI on Windows instead of lein
- Deploy from JDK 11 (tools.build requires 11+)
- Add test-inbetween-jdks to deploy requirements
- Skip lein-specific source download test when lein is not available
- Add deps.edn coordinate format to README usage section
The JDK source download script needs wget, unzip, and zip which
aren't in the tools-deps Docker images.
bbatsov added 2 commits April 15, 2026 21:24
Eastwood analyzes test namespaces that import test-only Java classes
(e.g. PrivateFieldClass), so compile-test-java must run first.
The test-download-sources-jar-using-lein test can never run now that
project.clj is gone. The tools.deps download paths are already covered
by test-download-sources-jar.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite build to tools.deps?

1 participant