Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions intellij-plugin/hs-features/ai-debugger-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ plugins {
id("intellij-plugin-module-conventions")
}

// Since 2026.1 the Java debugger API (`JavaLineBreakpointType`, `DebugProcessImpl`, etc.) lives in the
// `intellij.java.debugger.impl` content module of the Java plugin. In 2026.1 the module is required,
// so a dependency on the Java plugin is enough to see it, but since 2026.2 it is optional and has its own classloader,
// so it must be declared explicitly. In 2025.x these classes are part of the Java plugin's main module
private val javaDebuggerModuleDependenciesMarker = "<!-- JAVA_DEBUGGER_MODULE_DEPENDENCIES -->"
private val javaDebuggerModuleDependencies = if (environmentName.toInt() >= 261) {
listOf(
"intellij.java.debugger.impl",
).joinToString("\n") { " <module name=\"$it\"/>" }
}
else {
""
}

dependencies {
intellijPlatform {
intellijIde(ideaVersion)
Expand All @@ -14,4 +28,13 @@ dependencies {

testImplementation(project(":intellij-plugin:hs-core", "testOutput"))
testImplementation(project(":intellij-plugin:hs-features:ai-debugger-core", "testOutput"))
}

tasks.processResources {
inputs.property("javaDebuggerModuleDependencies", javaDebuggerModuleDependencies)
filesMatching("ai-debugger-jvm.xml") {
filter { line ->
if (javaDebuggerModuleDependenciesMarker in line) javaDebuggerModuleDependencies else line
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<!--suppress PluginXmlValidity -->
<module name="ai-debugger-core"/>
<plugin id="com.intellij.modules.java"/>
<!-- Java debugger 2026.1+ module dependencies are inserted here by build.gradle.kts. -->
<!-- JAVA_DEBUGGER_MODULE_DEPENDENCIES -->
</dependencies>

<extensions defaultExtensionNs="HyperskillEducational">
Expand Down
Loading