I've been messing around with the intellij-community version of IntelliJ IDEA as part of my university thesis work, and I've run into something about the build process that I do not understand. I have some understanding of build systems in other languages but have a mostly superficial understanding of Maven/Gradle, so I think I am missing something important.
When building the Kotlin modules, there is a library dependency on "kotlinc.kotlin-compiler-common" which is provided by a JetBrains Maven repository (via coordinate org.jetbrains.kotlin:kotlin-compiler-common-for-ide:X.X.X-XXXX). When I try to build the base intellij-community git repository everything works as expected. When I've lifted parts of the repository piecemeal and tried to replicate the build process however, I am not able to set up an index of the Maven repository that provides this and similar library dependencies. Simply creating local library jar entries pointing to the downloaded .jar files causes compile-time errors where it appears as if the statically compiled libraries are missing class dependencies which are defined in the intellij-community source (Eg. KotlinLanguage extends Language, KtElement extends NavigatablePsiElement). When I navigate the intellij-community repository code using IntelliSense it appears that IntelliJ thinks the static library depends on the source code implementations of the parent classes, which seems strange to me.
How does this work? Are the parent classes of the Kotlin classes being injected somehow during the build process? Is IntelliSense simply confused as to where the parent classes are actually defined? If the static library depends on static definitions of PsiElement, how does changing the source code implementation of PsiElement affect the build?
Thank you for your attention.