Hi Folks working on upgrading gradle, IJ gradle plugin, and targetting 251.x EAP
Build.gradle (extract):
dependencies {
//Create the plugin
intellijPlatform {
intellijIdeaCommunity(IDEA_VERSION)
bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })
pluginVerifier()
testFramework(TestFrameworkType.Bundled)
}
}
I know using Bundled is not recommended, but we do use it currently, switching to TestFrameworkType.Platform does not contain the class com.intellij.compiler.CompilerTestUtil
which we are using in a few instances with regards to tests where we compile mocked up modules and check the classpaths.
Without this we get failures during compile it fails to find the JDK correctly, this is the location it is failing without the CompilerTestUtil
final CompilerManager compilerManager = CompilerManager.getInstance(myProject);
//CompilerTestUtil.saveApplicationSettings();
compilerManager.make(scope, compileStatusNotification); <-- failure
It may be that we need to recreate this test but for now, as I do not know the ins and outs of this test my aim is to get it working as it did previously.
Previous using:
gradle version: 8.3
id("org.jetbrains.intellij.platform") version "2.1.0"
IDEA_VERSION: "2024.3"
Now using:
gradle version: 8.12.1
id("org.jetbrains.intellij.platform") version "2.2.1" (also tested "2.2.0")
IDEA_VERSION: "251.20015.29"
When upgrading org.jetbrains.intellij.platform “2.2.1” the testFramework.jar does not seem to exist locally. It is not shown within my IntelliJ “External Libraries” list (like it was before).
In the gradle dependencies for testRuntimeClasspath, it does exist but points to a location that does not exist <project_root>/… (see image)
We also use a gradle transformer which falls over because the above jar does not exist at the path shows above. (not that we actually transform it, but setting the trigger attribute to true fails)
Then all classes from this library such as com.intellij.testFramework.HeavyPlatformTestCase, com.intellij.testFramework.PlatformTestUtil as well as com.intellij.compiler.CompilerTestUtil are not recognised.
It looks like bumping the org.jetbrains.intellij.platform is causing the bundled jar to not be available. (I have tried reverting the target platform to 2024.3 and still had the same issue, but moving the org.jetbrains.intellij.platform back but leaving everything else the same didnt have the issues, id like to keep this upgraded if possible and have seen issues like this Build fails with latest Idea EAP when running tests - the answer being upgrade the org.jetbrains.intellij.platform to latest.)
I am currently at a cross roads 1. to move away from Bundled and rewriting the tests - not ideal or 2. figure out why the bundled jar file is not available or 3. keep using the org.jetbrains.intellij.platform 2.1.0 - having other problems.
I am hoping for your help here on number 2.
Any thoughts will be helpful!