On this page https://practical.li/clojure/clojure-cli/projects/tools-build/ , in the box titled "Java ARchive - jar file" is the sentence fragment "... and can contain Clojure sources or compiled class files from the project (or both)". I've been searching for a couple of hours now, and I can't find any instructions, sample projects, tutorials, or guides that show how to setup a project that uses tools-build/tools-deps to create a project that yields an uberjar with no source code and AoT compiled. I'm trying to create the smallest, fastest loading, .jar file I can for an IoT project. Any pointers would be greatly apperciated!
The tools.build guide has an aot compiled uberjar example - you would just need to remove the one line that copies source to skip that
That’s the call to b/copy-dir in that example
Wow! Thanks for the immediate response, Alex!
I would also recommend setting the compile-clj compiler settings to use direct linking and elide meta if you’re looking for fastest and smallest, see https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-compile-clj
Makes sense!
More explanation at https://clojure.org/reference/compilation if needed
Thanks, again!