jps-to-bazel: skip plugins/bazel is it a separate Bazel project

GitOrigin-RevId: 861c1cae46ef853e4ccc5e3d58069fde3a696183
This commit is contained in:
Leonid Shalupov
2025-04-23 18:32:54 +00:00
committed by intellij-monorepo-bot
parent 5b6aa60115
commit 06bb1616c3
@@ -190,6 +190,8 @@ internal class BazelBuildFileGenerator(
}
fun computeModuleList(): ModuleList {
val bazelPluginDir = projectDir.resolve("plugins/bazel")
val community = ArrayList<ModuleDescriptor>()
val ultimate = ArrayList<ModuleDescriptor>()
for (module in project.model.project.modules) {
@@ -198,6 +200,12 @@ internal class BazelBuildFileGenerator(
continue
}
val imlDir = JpsModelSerializationDataService.getBaseDirectory(module)!!.toPath()
if (imlDir.startsWith(bazelPluginDir)) {
// Skip bazel plugin, they have their own bazel definitions
continue
}
val descriptor = getModuleDescriptor(module)
if (descriptor.isCommunity) {
community.add(descriptor)