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

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.

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

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.

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.