The ordering of jars on the classpath between Gradle 1.3 and Gradle 1.10

I spent a day in classpath purgatory tracking down a runtime error that I finally have a handle on. I’m not necessarily looking for an answer, because at this point I don’t think it really matters. But I wanted to air this in case I’m missing something important.

I’m in the process of migrating from Gradle 1.3 to Gradle 1.10. My project has about 270 jars on the classpath (ugh).

When I examine the runtime classpath in Gradle 1.3, this particular ordering of cglib and cglib-nodep obtains


and when I examine the runtime classpath with Gradle 1.10, this ordering obtains


You can see that they are flipped with respect to one another.

As an aside, the Gradle 1.10 ordering breaks my app at runtime, where cglib 2.1_3 wants to load a version of an ASM class that is not on the classpath.

I’m not sure what the right question to ask is, but this difference in ordering can be significant and I wanted to point it out should someone else see something in it.

Hi Mark,

That’s always a nasty problem to debug. This change happened in 1.8 and was mentioned in the potential breaking changes in the release notes:

It wasn’t a decision we made lightly, but we were able to make way for some serious enough optimisations with this change that we decided to go for it.

Got it. Thanks. I know jumping from Gradle 1.3 to Gradle 1.10 is a huge change, and I figured you guys knew about this. Glad the loop is closed, for me and posterity.