java.lang.ClassNotFoundException: git4idea.GitUtil although it's properly defined in the build.gradle.kts
Answered
Hi all. After reading https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html#1-locating-plugin-id-and-preparing-sandbox and https://intellij-support.jetbrains.com/hc/en-us/community/posts/9936268954258-git4idea-doesnt-compile-with-the-latest-versions-How-to-deal-with-deprecations I've come up with the following implementation of the Git4Idea plugin in my build.gradle.kts:
intellij {
version.set("2024.1")
type.set("IC")
plugins.set(listOf("Git4Idea"))
}
Unfortunately I still get the java.lang.ClassNotFoundException: git4idea.GitUtil.
What am I missing?
Please sign in to leave a comment.
Hi Michal,
Did you add it to plugin.xml?
https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html#3-dependency-declaration-in-pluginxml
This indeed did the trick, thank you. For all future readers the correct declaration of the dependency is:
<depends>Git4Idea</depends>
and not
<depends>com.intellij.modules.vcs</depends>