Bazel kotlin build target cannot resolve classes from intellij SDK

15 Views Asked by At

I am developing an intellij plugin, and I use bazel to build my project.

When I run the build, I see a lot of errors related to class in intellij SDK. Such as:

error: unresolved reference: VirtualFile

which refers to

com.intellij.openapi.vfs.VirtualFile

I am not sure how to resolve this.

When I compare it to a gradle setup, it looks like gradle has a proprietary logic for this, and all I see is a gradle dependency that I cannot find in any maven repository. (com.jetbrains:ideaIC:241-EAP-SNAPSHOT)

At some point I reached Intellij Snapshot repository and I tried to install different maven dependencies such as com.jetbrains.intellij.idea:ideaIC:241-EAP-SNAPSHOT which seems close. But this does not resolve the problem, and does not seem to be the right approach.

My bazel target currently looks like

kt_jvm_library(
    name = "kotlin_sources",
    srcs = glob(["src/main/kotlin/**/*.kt"]),
    deps = [
        "@maven//:nl_basjes_maven_enforcer_codeowners_codeowners_enforcer_rules",
        "@maven//:com_google_code_gson_gson",
    ],
)
0

There are 0 best solutions below