Hi,
Context: I'm using Proguard to try to minimize an uberjar produced with lein uberjar. This is failing, because when I run the resulting jar with java -jar minimized.jar, I get errors about missing classes while trying to load/compile .clj files. proguard is renaming classes and removing unused ones. In this case, the class is still in the jar, but under another name. As long as the _class_ files are loaded, this should be fine (it's proguard's job to rename all references). But proguard doesn't know about Clojure, so the Clojure files don't get the same treatment. I understand that Clojure generally imports source files as resources, but I was hoping with an :aot :all uberjar, that wouldn't be the (primary) case. Removing clj[csx]? files from the jar (via :uberjar-exclusions) (which I was hoping would force it to try the class files), breaks:
Caused by: java.io.FileNotFoundException: Could not locate clojure/core_instant18__init.class or clojure/core_instant18.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
Do I misunderstand how :aot :all works? Are clj files always going to exist in the resulting uberjar if I want Clojure to work?
lvh