Zach Tellman talked
<https://groups.google.com/forum/#!topic/clojure-dev/HT5NnY2ROUg> about
making Clojure work better with Proguard in August 2016. I couldn’t find
any open JIRA tickets about this though.

https://www.deepbluelambda.org/programming/clojure/creating-android-applications-with-clojure--slimming-things-down-with-proguard
 and
https://github.com/sattvik/Clojure-Android-Examples/blob/master/slimmed/proguard.cfg
are
from an old post about Proguard on Android which looks like it might have
what you need to get started, though I’m not sure about core_instant18.clj.
Possibly something like this might help?

-keep class clojure.core_instant18__init { public static void load(); }

On Sun, Apr 2, 2017 at 6:49 AM lvh ‌ <_...@lvh.cc> wrote:

> 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.
>
> This appears to be due to this source file:
> https://github.com/clojure/clojure/blob/master/src/clj/clojure/core_instant18.clj
> ; and the lack of matching class file can be explained because it is in the
> clojure.core namespace.
>
> 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
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Daniel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to