Hi,
I’m using SVNKit in my build logic, but it somehow fails to get the cached credentials under Windows. I learned that this is only accessible using the native SVN backend, which fails to load with the great exception:
java.lang.UnsatisfiedLinkError: Can't obtain updateLastError method for class com.sun.jna.Native
I found that this is a mismatch between the JNA jar 4.x and its native counterpart in version 3.x.
SVNKit brings in JNA 4.1 via its transitive closure, but Gradle still provides the native library in version 3.2.7.
tl;dr Gradle uses quite an old version of JNA
I was able to work around the issue like this
buildscript {
configurations.classpath {
resolutionStrategy.force 'net.java.dev.jna:jna:3.2.7'
}
}
but it’s obviously not a pretty solution altering the major version of some dependency, making the build now dependent upon a specific Gradle version’s implementation detail (I’m using Gradle 2.10 here).
Is there a better way to solve this?
Are there any plans about whether Gradle will update JNA in the foreseeable future, or is it safe to trust that this will stay on 3.2.7?
Best regards,
Oliver