On 15 July 2014 at 8:14:58 pm, Lóránt Pintér (lorant.pin...@gmail.com) wrote:

Hi,

I’m trying to build a plugin with Guava 17 with Gradle 1.12, but when compiling 
the code, I get errors for whatever functionality was not present in Guava 14. 
It seems that gradleApi() has on its classpath a Guava version 14 (backport for 
JDK5).

I found this bug, which says it has been resolved:
http://issues.gradle.org/browse/GRADLE-2962

Is there a way I can use my version of Guava in plugins?
You can, but you can’t compile or test it :)

At runtime, Guava is not exposed to plugin classes because we hide Gradle’s 
internal dependencies from plugins. When compiling against gradleApi() though 
this doesn’t happen and you get a flat classpath including some of the internal 
dependencies. It’s a problem we know of and are working towards a fix for.

Short answer: no, you can’t use your own version of Guava.


Reply via email to