IntelliJ `AnAction` 클래스를 구현하거나 수정하고 `plugin.xml`에 등록하도록 안내합니다. 표시 이름과 설명은 메시지 번들에 두고, 필요하면 아이콘을 설정하며, 이벤트 코루틴 범위에서 중단 함수를 실행해 동기식 처리로 IDE가 멈추는 일을 방지합니다.
- IDE 메뉴에 새 동작 추가
- 동작 등록이나 아이콘 변경
- 동작 이름과 설명 정리
IntelliJ의 JPS 프로젝트에서 의사 Kotlin Multiplatform 모듈을 만들거나 이전합니다. 소스 세트와 모듈 설정을 구성하고 expects 컴파일러 플러그인으로 공통 선언과 플랫폼별 구현을 연결합니다.
Create or modify IntelliJ pseudo-KMP expect/actual modules.
실행 점수 미검증
설치 방법 보기IntelliJ의 JPS 빌드 환경에서 Kotlin Multiplatform을 흉내 내는 모듈을 만들거나 이전하는 방법을 안내합니다. 공통 코드와 JVM, WasmJs, JS, Native 코드의 소스 폴더 구성, .iml에 지원 모듈 의존성과 expects-compiler-plugin을 등록하는 방법, 구조 테스트에 모듈을 추가하는 절차를 다룹니다. 공통 함수는 linkToActual()로 선언하고, 각 플랫폼 함수는 @Actual과 플랫폼 접미사로 연결하는 방식도 설명합니다. 허용되는 라이브러리 의존성과 공통 소스 세트를 표시하는 마커 파일도 안내합니다.
IntelliJ 모노레포에 멀티플랫폼용 모듈을 새로 만들거나 기존 모듈을 의사 KMP 구조로 옮길 때 유용합니다. 하나의 모듈에서 공통 코드와 플랫폼별 구현을 정리하거나 .iml 설정, 의존성, 소스 루트를 확인할 때도 사용할 수 있습니다.
최상위 함수만 지원하며 공통 선언과 플랫폼 구현은 같은 모듈에 있어야 합니다. WasmJs 소스 폴더를 .iml의 소스 루트로 추가하면 안 됩니다.
이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.
AI가 SKILL.md의 내용에서 주의가 필요한 작업과 도입 전제를 확인했습니다. 점수는 실제로 실행한 결과(실행 검증)만으로 매깁니다.
점수에는 넣지 않았습니다. 2026년 10월 28일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.
설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
The monorepo is compiled by JPS, which does not support Kotlin Multiplatform. To emulate KMP expect/actual declarations, the Fleet team created the expects-compiler-plugin. This skill covers how to set up and work with modules that use this mechanism.
linkToActual() and @Actual API docsWhen creating or migrating a pseudo-KMP module:
Register in the structure test. Add your module name to the multiplatformModules list in com.intellij.ideaProjectStructure.fast.MultiplatformModuleStructureTest (tests/ideaProjectStructure/testSrc/com/intellij/ideaProjectStructure/fast/MultiplatformModuleStructureTest.kt).
Use only allowed library dependencies. The test enforces a closed set:
kotlin-stdlibkotlinx-coroutines-corekotlinx-coroutines-debugjetbrains-annotationskotlinx-serialization-corekotlinx-serialization-jsonkotlin-reflectkotlinx-collections-immutableIf you need a new library, add it to allowedMultiplatformLibraryDependencies in the test. Dependencies on other multiplatform modules (those in multiplatformModules) are also allowed.
Set up source folders:
src/ — common codesrcJvm/ or srcJvmMain/ — JVM-specific code (Java code can live here too)srcWasmJs/ or srcWasmJsMain/ — WasmJs-specific codesrcJsMain/ — JS-specific codesrcNativeMain/ — Native-specific codeImportant: Do NOT add srcWasmJs/srcWasmJsMain as a source root in the .iml file. The IDE would try to compile it in JVM mode.
Add the .pseudoCommonKotlinSourceSet marker file to the common source root (e.g., src/.pseudoCommonKotlinSourceSet). This empty file tells the Kotlin plugin that the source set is common code, preventing Optimize Imports from removing imports that are unnecessary on JVM but mandatory in common code (e.g., @JvmStatic, @JvmField).
Your .iml file needs two things: the multiplatformSupport dependency and the compiler plugin registration.
Use community/platform/util/multiplatform/intellij.platform.util.multiplatform.iml as a reference. To find the current plugin version, check that file rather than hardcoding.
<orderEntry type="module" module-name="intellij.platform.multiplatformSupport" scope="PROVIDED" />
<facet type="kotlin-language" name="Kotlin">
<configuration version="5" platform="JVM 1.8" allPlatforms="JVM [1.8]" useProjectSettings="false">
<compilerSettings>
<option name="additionalArguments" value="-Xjvm-default=all ..." />
</compilerSettings>
<compilerArguments>
<stringArguments>
<stringArg name="jvmTarget" arg="1.8" />
<stringArg name="apiVersion" arg="2.3" />
<stringArg name="languageVersion" arg="2.3" />
</stringArguments>
<arrayArguments>
<arrayArg name="pluginClasspaths">
<args>$MAVEN_REPOSITORY$/jetbrains/fleet/expects-compiler-plugin/{VERSION}/expects-compiler-plugin-{VERSION}.jar</args>
</arrayArg>
</arrayArguments>
</compilerArguments>
</configuration>
</facet>
Replace {VERSION} with the version from the reference IML.
Only top-level functions are supported. Both the expect and actual declarations must be in the same module.
src/)Use linkToActual() as the function body:
import fleet.util.multiplatform.linkToActual
internal fun myFunction(param1: String, param2: Int): Boolean = linkToActual()
srcJvm/, srcWasmJs/, etc.)Annotate with @Actual. The function name must be the expect function name + platform suffix:
import fleet.util.multiplatform.Actual
@Actual
internal fun myFunctionJvm(param1: String, param2: Int): Boolean {
// JVM implementation
}
| Platform | Suffix | Source folder |
|---|---|---|
| JVM | Jvm | srcJvm/ or srcJvmMain/ |
| WasmJs | WasmJs | srcWasmJs/ or srcWasmJsMain/ |
| JS | Js | srcJsMain/ |
| Native | Native | srcNativeMain/ |
| Multi-platform build | Impl | (rare) |
Common (community/platform/util/base/multiplatform/src/com/intellij/util/text/CharArrayUtilKmp.kt):
internal fun getCharsPlatformSpecific(
sequence: CharSequence, srcOffset: Int, dst: CharArray, dstOffset: Int, len: Int
): Boolean = linkToActual()
JVM actual (community/platform/util/base/multiplatform/srcJvmMain/com/intellij/util/text/jvm.kt):
@Actual
internal fun getCharsPlatformSpecificJvm(
string: CharSequence, srcOffset: Int, dst: CharArray, dstOffset: Int, len: Int
): Boolean {
if (string is CharBuffer) { /* ... */ }
return false
}
@JvmStatic, @JvmField, and similar annotations are not auto-imported in common code. Import them manually. The .pseudoCommonKotlinSourceSet marker prevents the IDE from removing these imports.srcJvm/)../build/jpsModelToBazel.cmd after modifying any .iml files.MultiplatformModuleStructureTest to validate module structure:
./tests.cmd --module tests.ideaProjectStructure --test com.intellij.ideaProjectStructure.fast.MultiplatformModuleStructureTest
mcp__ijproxy__lint_files.The monorepo does not publish multiplatform artifacts to Maven Central directly. Separate repositories with Gradle infrastructure extract module sources, compile with true KMP, and publish. See fleet-multiplatform-deps and fleet-parser-collection in JetBrains Space.
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
IntelliJ `AnAction` 클래스를 구현하거나 수정하고 `plugin.xml`에 등록하도록 안내합니다. 표시 이름과 설명은 메시지 번들에 두고, 필요하면 아이콘을 설정하며, 이벤트 코루틴 범위에서 중단 함수를 실행해 동기식 처리로 IDE가 멈추는 일을 방지합니다.
IntelliJ JPS 테스트 모듈을 Bazel로 옮기고 Bazel에서만 발생하는 실패를 조사하는 안내서입니다. 의존성, 플러그인, 테스트 데이터와 runfiles 문제를 확인하고 생성된 대상과 이전된 테스트를 검증합니다.
IntelliJ 프로젝트 규칙에 맞춰 Kotlin과 Java 코드를 작성하거나 검토합니다. 언어 선택, 서식, 봉인 타입, 스레드 주석, 제어 흐름 예외 처리를 확인합니다.
이 가이드는 IntelliJ 프로젝트의 변경 사항을 목적별로 나누고 프로젝트 형식에 맞는 커밋 메시지를 작성하도록 돕습니다. 티켓이 있으면 번호와 변경 설명을, 없으면 레이블과 하위 시스템명을 사용하며 필요에 따라 이유와 판단을 본문에 담습니다.
여러 Python 타입 검사기로 코드 조각이나 파일의 타입 추론과 오류 판정을 비교합니다. 도구별 결과, 실행 시간, 진단 내용을 Markdown 보고서로 모아 저장할 수 있습니다.
Compose Desktop 화면을 구성할 때 컴포저블은 렌더링을 맡고 프레젠터나 코디네이터는 앱 결정을 맡도록 구조를 정리합니다. 상태 소유권, Effect, 재사용 컴포넌트 API, 지연 목록 키, 애니메이션과 성능을 개별 UI 변경에 맞춰 살펴봅니다.