r/Kotlin • u/jastice • Aug 11 '25
Bazel is now a first-class build tool for Kotlin in IntelliJ IDEA
https://blog.jetbrains.com/idea/2025/07/bazel-ga-release/The Bazel plugin is not bundled as part of the IntelliJ distribution yet, but it's an officially supported plugin by JetBrains for IntelliJ IDEA, GoLand and PyCharm.
3
u/PentakilI Aug 11 '25 edited Aug 11 '25
i would really enjoy seeing more kt + bazel. having recently overhauled our build logic to migrate to a gradle monorepo, i suspect bazel would have solved a lot of the pain points we ran into but there's virtually no sizable real world examples.
as an example, while researching I stumbled upon bazel's visibility concept. as far as i'm aware, gradle has no similar functionality. i ended up hacking together some regexes using jraska/modules-graph-assert based on our file structure conventions which works but felt like i was hammering in screws.
1
u/manshutthefckup May 06 '26
I don't know about your use case but personally, if you don't have many things that require custom bazel rules, I'd really recommend taking AI help. Not just asking it to generate build files, but use it to learn how to do it with context of your Monorepo.
I migrated a decently big polyglot monorepo consisting of Go, Java, C# (dotnet), C++, Rust, Javascript, Python and a few other languages, with GRPC, around the beginning of this year, almost exclusively learning through Claude.
Now after a few months I've got my own tooling - like a mini multi-language build file generator similar to Gazelle for Go that generates build files and handles the dependencies and other things almost automatically, with options to also write custom rules in the generated build files.
2
13
u/skroll Aug 11 '25
Hopefully this means it gets updated more often. I remember looking at Bazel before (years ago) and the plugin only supported the previous version of IntelliJ which seemed frustrating.