用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/JetBrains/intellij-community --skill module-dependencies命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Convert Product DSL module sets into bundled wrapper plugins.
Convert Product DSL module sets into bundled wrapper plugins.
Migrate IntelliJ JPS module tests to Bazel and debug Bazel-only test/runtime/plugin dependency failures.
基于 SOC 职业分类
正在显示 SKILL.md
| name | module-dependencies |
| description | Add or modify IntelliJ module dependencies in `.iml` files. |
This document describes how to manage module dependencies when working with IntelliJ IDEA codebase.
The repository uses a hybrid build system:
build/jpsModelToBazel.cmd after changing .iml filesWhen creating or editing a JPS module .iml, use the helper instead of hand-editing project module lists:
bun build/jps-module.mjs register <path-to-iml> --fix-iml-eof
The helper:
.idea/modules.xmlcommunity/... modules in community/.idea/modules.xml.iml basename without the .iml suffix, matching org.jetbrains.intellij.build.ModulesXml.iml files when --fix-iml-eof is passedUse bun build/jps-module.mjs check <path-to-iml> --fix-iml-eof to verify without writing.
To manually run the converter that generates Bazel BUILD files from .iml files:
./build/jpsModelToBazel.cmd
This is useful when:
BUILD.bazel files have auto-generated sections marked with comments:
### auto-generated section `build module.name` start
... generated content ...
### auto-generated section `build module.name` end
### auto-generated section `test module.name` start
... generated content ...
### auto-generated section `test module.name` end
Key rules:
To prevent auto-generation of a section (so you can provide custom content):
### skip generation section `test module.name`
Example - Custom test target with preserved content:
load("@community//build:tests-options.bzl", "jps_test")
# Custom test target (before auto-generated sections)
jps_test(
name = "my-tests_test",
runtime_deps = [
":my-tests_test_lib",
"//:main_test_lib",
],
)
### skip generation section `test my.module.name`
### auto-generated section `build my.module.name` start
... (let generator handle the build section)
Product layouts can include content modules directly. If production runtime already gets a dependency from a content module in the product layout, that content-module dependency can be enough and does not automatically require adding a wrapper plugin dependency to a production .iml or plugin descriptor.
Test plugin resolution is different because tests often do not run with the full production product layout or flat classpath. If a test module loads a plugin whose dependencies include content modules owned by a wrapper plugin, add the wrapper plugin as a test/runtime dependency in the test module .iml instead of broadening the production module dependency. For example, a test that needs Problems View content modules may need intellij.platform.problemView.plugin as a runtime dependency even when the production module only depends on Problems View content modules.
When you need to fix missing dependencies:
.iml with the repo-approved edit tool.bun build/jps-module.mjs register <path-to-iml> --fix-iml-eof for every changed module file../build/jpsModelToBazel.cmd so generated BUILD.bazel files match the .iml source of truth.