-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade jgit library #182
Comments
Bad news! JGit requires Java 1.7 and, while Android does say they are JDK7 compatible, they are not 100% compatible. File.toPath has not been implemented in libart-core.jar, thus JGit 4.0+ will not work. The best we can do is upgrade to the latest 3.x branch (short of sending a patch to AOSP). |
@bigdavedev thanks for looking into this and the PR. |
Interesting. While doable, it presents a challenge, since File.toPath() returns an instance of Path which doesn't exist at all in Android. I can't figure out what the alternative would be. I'll dig a little and see what I come up with. |
You can just add a back-ported java/nio/file/Path to SGit, or submit a patch to JGit... |
@henrik242 thats what I thought at first too, but unfortunately its not that simple - turns out its actually the usage of Path in File that is the issue and as per my earlier comment the only way to do this now is to patch jgit to not use it and then porting in Path or just not using it at all. |
@maks OK, makes sense. I tried back-porting the File.toPath() usages here: henrik242/jgit@9b3ef34 It builds (with
It's probably related to symlink handling. Or something. |
@henrik242 thanks for working on this! That's a great start. And it looks like the changes required are not too big. |
@maks I don't think the eclipse maintainers will agree to support jdk6 again, so we'll probably have to maintain our own patch set. But I fully agree that we should make the unit tests run properly. |
@maks We might try to go another route instead, by using NNIO: A Java NIO.2 Substitute Library |
This issue was moved to maks/MGit#26 |
Currently using jgit:3.6.2.201501210735 whereas maven central already has available jgit:4.4.0.201605250940-rc1
The text was updated successfully, but these errors were encountered: