Ivy artifacts for some configurations don't refresh


(Zsolt Galambos) #1

Hi,

I encountered a scenario several times where some dependencies from Ivy don’t get refreshed by Gradle. Some background:
Ivy module in remote repository:

  • my-service, version: 1.17-latest, multiple artifacts:
    -> contract (my-service-contract-1.17-latest.jar)
    -> impl (my-service-impl-1.17-latest.jar)
    -> …

If such a module is built, all artifacts are created and published again, furthermore e.g. build date is stored in MANIFEST.MF meaning SHA-1 hash is always changing.

Gradle modules (v 3.5):

  • my-lib, dependencies: my-service-contract (changing)
  • my-web, dependencies: my-lib (project), my-service-impl (changing)

In some cases only my-service-contract (+ ivy-1.17-latest.xml) is downloaded from the Ivy repo when building the Gradle modules, my-service-impl stuck with old version. As I see in the debug build logs (attached), the -impl dependency is not even checked whether it’s expired, I guess based on the refreshes of ivy.xml/-contract it’s considered up-to-date without any check.

I also implemented a check that compares the SHA-1 hash of the dependency .jar with the latest version stored in the Ivy repo when assembling my-web, it also confirms that only some of the artifacts are refreshed…

Could you please suggest what could be wrong here? Could this be a bug in the Gradle code?
Thanks,
Zsolt G.

Build log extract: buildlog.zip (23.4 KB)


(Zsolt Galambos) #2