11import org.gradle.api.Project
22import org.gradle.process.JavaForkOptions
33import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
4+ import org.jetbrains.intellij.platform.gradle.TestFrameworkType
45import org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesExtension
56import kotlin.reflect.KProperty
67
@@ -14,7 +15,7 @@ private const val IDE_RIDER = "rider"
1415val Project .environmentName: String by Properties
1516
1617val Project .pluginVersion: String by Properties
17- val Project .platformVersion: String get() = " 20${StringBuilder (environmentName).insert(environmentName.length - 1 , ' .' )} "
18+ val Project .platformVersion: String get() = " 20${StringBuilder (environmentName).insert(2 , ' .' )} "
1819val Project .baseIDE: String by Properties
1920
2021val Project .ideaVersion: String by Properties
@@ -78,7 +79,7 @@ val Project.jvmPlugins: List<String>
7879 get() = listOf (
7980 javaPlugin,
8081 " JUnit" ,
81- " org.jetbrains.plugins. gradle"
82+ " com.intellij. gradle" ,
8283 )
8384
8485val Project .javaScriptPlugins: List <String >
@@ -94,7 +95,11 @@ val Project.rustPlugins: List<String>
9495 )
9596
9697val Project .cppPlugins: List <String >
97- get() = listOf (
98+ get() = listOfNotNull(
99+ baseVersion.toTypeWithVersion()
100+ .version
101+ .takeUnless { /* TODO remove with 252 */ it.startsWith(" 2025.2" ) }
102+ ?.let { " com.intellij.cmake" },
98103 " com.intellij.cidr.lang" ,
99104 " com.intellij.clion" ,
100105 " com.intellij.nativeDebug" ,
@@ -134,7 +139,10 @@ fun IntelliJPlatformDependenciesExtension.intellijIde(versionWithCode: String) {
134139 // Starting from 2025.3, IntelliJ IDEA Community and Ultimate are unified into a single distribution.
135140 // Use the new intellijIdea() helper which resolves the unified artifact.
136141 // See: https://blog.jetbrains.com/platform/2025/11/intellij-platform-2025-3-what-plugin-developers-should-know/
137- if (type == IntelliJPlatformType .IntellijIdeaUltimate && version.startsWith(" 2025.3" )) {
142+ if (type == IntelliJPlatformType .IntellijIdeaUltimate
143+ && ! version.startsWith(" 2025.2" ) /* TODO remove with 252 */
144+ && ! version.startsWith(" 252" )
145+ ) {
138146 intellijIdea(version) {
139147 useInstaller.set(false )
140148 useCache.set(true )
@@ -177,6 +185,13 @@ fun IntelliJPlatformDependenciesExtension.testIntellijPlugins(notations: List<St
177185 testIntellijPlugins(* notations.toTypedArray())
178186}
179187
188+ fun IntelliJPlatformDependenciesExtension.testIntellijPlatformFramework (
189+ project : Project ,
190+ frameworkType : TestFrameworkType = TestFrameworkType .Platform ,
191+ ) {
192+ testFramework(frameworkType, project.baseVersion.toTypeWithVersion().version)
193+ }
194+
180195// Since 2024.1 CLion has two sets of incompatible plugins: based on classic language engine and new one (AKA Radler).
181196// Platform uses `idea.suppressed.plugins.set.selector` system property to choose which plugins should be disabled.
182197// But there aren't `idea.suppressed.plugins.set.selector`, `idea.suppressed.plugins.set.classic`
0 commit comments