Is it possible to make lein uberjar not create a jar if no changes have been made since the previous jar was made?
Either as a feature of leiningen or with some bash scripting?
My specific use case is that I’m calling lein from within a CMake build system of a larger project.
execute_process(COMMAND lein uberjar
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
All the C++ sources are skipped if they haven’t changed, but uberjars keep being made.
The find command will allow you to find all files that are newer than another file.
A script built on that might look something like this:
If your project has snapshot dependencies you will skip the check that determines whether you should update your snapshots from the central repo.
I suspect you’d be better off just taking the hit of building the uberjar everytime.