دنبال کننده ها

۱۳۹۶ مهر ۸, شنبه

javafx - Can lein run specific custom code after compiling everything else?

[ad_1]



I've been trying to work around the issue issue of building a Clojure JavaFX project that is both compilable and interactive, while still being able to import and proxy classes that run static initialization. I trying applying this patch to 1.9.0-master-SNAPSHOT, but no luck.



So my workaround is to initialize the toolkit first, during the compilation step, by making it the first thing in the first dependency. However, as mentioned elsewhere, this prevents the compile step from terminating, so I have to kill the toolkit for it to work.



Currently I'm doing this with a thread that runs a 5 second timer, assuming 5s is enough time to compile other files in the same lein... invocation, but it's obviously not a good solution.



Question:



Is there a way to run arbitrary Clojure code as the last thing in a lein compile, lein uberjar, etc?



For example, ensuring that some .clj file is the very last one to get compiled, or putting something in the project.clj file? All it needs to do is run (javafx.application.Platform/exit) after everything is done compiling. Searches for lein compilation order usually point to the ordering/sequencing of Clojure vs Java sources.




[ad_2]

لینک منبع