Can custom plugin use different version of internal jar (JNA)

(Alexey Trenikhin) #1

I’m developing plugin, which uses JNA 4.0, on other hand gradle 1.7 itself uses jna-3.2.7.jar. Is it possible to hide jna-3.2.7.jar from plugin.

(Peter Niederwieser) #2

Plugins are supposed to be shielded from internal dependencies. Have you verified that your plugin can’t use JNA 4.0?

(Alexey Trenikhin) #3

I don’t remember which exactly class conflicts between JNA 3.x and 4. I tried different thing - to use one of JNA classes without adding dependency to JNA 4.0, and code gets executed, so I assume that one of parent class loaders has JNA.

(Peter Niederwieser) #4

I’m not sure if that’s Gradle’s JNA library, or some JNA library pulled in by your plugin. If it’s Gradle’s JNA library, you can’t change it.