:kodee-welcoming: We'd love some EAP feedback on a...
# gradle
t
kodee welcoming We'd love some EAP feedback on a new Kotlin tooling feature: Compiler Reference Index (CRI) for Gradle and Maven. CRI is a side-output of Kotlin compilation that lets IDEA narrow the search scope for Find Usages and Type Hierarchy. The bigger the codebase - the bigger impact it will have. It's now available for Gradle and Maven build systems K IDEA-side support is merged into the latest IntelliJ IDEA 2026.2 EAP and is enabled by default . You just need to enable CRI generation on the build side: 1. Use Kotlin 2.3.20 or newer with IDEA 2026.2 EAP (starting from Build #IU-262.8117.19, built on June 18, 2026) 2. Enable CRI generation in your build: ◦ Gradle - set
kotlin.compiler.generateCompilerRefIndex=true
in
gradle.properties
◦ Maven - incremental compilation is required, so enable both project properties in `pom.xml`:
Copy code
<properties>
    ...
    <kotlin.compiler.generateCompilerRefIndex>true</kotlin.compiler.generateCompilerRefIndex>
    <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
</properties>
3. Re-build the project (e.g.
./gradlew assemble --rerun-tasks
so the
compileKotlin
tasks re-run and produce CRI artifacts). 4. Try Find Usages / Type Hierarchy in IDEA. You can sanity-check module status via Help → Diagnostic Tools → Kotlin CRI Diagnostics. kodee loving We'd love feedback on correctness and on what kind of performance improvement you see on your real projects - drop a comment here or file an issue on YouTrack. Slack Conversation
p
When I add this setting to gradle.properties, got
Copy code
w: ⚠️ Skipping the Compiler Reference Index data generation in 'my.app' (':my.app')
Compiler Reference Index data can be generated only when compilation is performed via Build Tools API.
Solution:
Please set `kotlin.compiler.runViaBuildToolsApi=true` to enable compilation via Build Tools API.
If I add
kotlin.compiler.runViaBuildToolsApi=true
then got warning that this setting is Deprecated (enabled by default for JVM) I guess for KMP project it is not enabled for targets other than JVM. But then how to set it only for non JVM targets to not getting warnings fo JVM?
t
it is not possible right now, we should fix it in next release. For now you could ignore the warning
KT-87084 False positive warning for JS and Wasm compilations when CRI is enabled
👍 1