Replace cached dependency for quick testing purposes


(Mark Petrovic) #1

I need to drop a custom-built SNAPSHOT jar into the local gradle cache to perform some quick testing of that jar. The SHA1 hash of the jar is different from the version currently in the cache.

Is there a clever way to install the jar into the local gradle cache so it’s used for the few quick tests I need to run?

Thanks much.


(Szczepan Faber) #2

I’m not aware of any clever way atm :confused: At some point we might grow the capabilities of refreshing cache, so that one can refresh selectively - perhaps something like that would be helpful in your scenario.

In general, maybe it’s best to model your use case explicitly. E.g. grow the automation so that it is possible to drop snapshots into a known location. This could be a local repo, declared early in the repositories chain. For this workflow it may be necessary to reduce the snapshot default cache time (by default it is 24 hours).

Hope that helps!


(Mark Petrovic) #3

Thank you for the thoughtful answer. That was very helpful.

Mark