Using Git4Idea as a library ?

I am writing code to analyze Git history of multiple Java (Android) projects. I found that Git4Idea is the plugin that Intellij IDEA uses to work with Git.
I want to ask what should I use Git4Idea ?

1) Create a plugin project, and add Git4Idea as a dependency.
2) Create a simple Java project and add Git4Idea as a library (similar as JGit in eclipse, I prefer this option but I don't know how to add Git4Idea as a library).

Could anyone help me out ?

Thank you so much.
Tam Nguyen.

1 comment
Comment actions Permalink

So, are you going to write a standalone application, or a plugin for IDEA?

If you're going to write a plugin, the first way is preferrable. That way you'll be in sync with current git4idea implementation used in IDEA.

Otherwise, you obviously don't need neither IDEA, nor a plugin. Then you can take git4idea.jar from some IDEA release bulid (from <installation dir>/plugins/git4idea.jar) and connect it as a library.


Please sign in to leave a comment.