continue/.idea
Jakub Blach 5f647afdf2 fix: Add file tests + migrate to IntelliJ Platform Gradle Plugin v2
The tests use fixtures and operate on real files in a temp directory.
This change will allow us to confidently migrate from java.io.File to VFS.

Note: These tests are headless and starts the Continue binary. This gives us many possibilities because we can write fast and valuable tests without runIdeForUiTests.

The IntelliJ Platform plugin already includes classes like BasePlatformTestCase written in JUnit 3, which we should be using for unit testing.
We also have JUnit 5 for e2e testing. As a result, we had two different runners, which caused problems because we couldn’t use classes like UsefulTest since they required a different runner.
In order to fix that, I had to add `org.junit.vintage:junit-vintage-engine` to enable running both JUnit 3 and JUnit 5 tests.

Note: ideally, we should have a sourceSet named testIntegration with its own dependencies for E2E (robot, JUnit 5, video recorder).
That would give us a clean separation between E2E tests and unit tests. That would prevent accidental use of JUnit 5 classes in unit tests. We should do that in the future.

The new platform simplifies plugin config and allows us to remove some of the custom code.
I left the original Qodana and Kover configs, but looking at our workflow, i think it's currently dead code.
If we don’t plan to use them, I think we can remove these dependencies in the future.

Note: along with this migration, I had to bump a wrapper to latest version.

For some reason, we included the Kotlin standard library with the plugin, even though we had a property specifying we didn’t want to.
I saw no objections to removing this dependency, so I decided to do that.

From now on, we rely on older stdlib that's bundled with 2022.3+.

More context: https://github.com/continuedev/continue/pull/6431#issuecomment-3031838189

This proves my point regarding the removal of the standard library dependency.

I added plugin verification against versions 2022.3.3 (oldest) and 2025.1.4 (newest). Everything is working.

Plugin can be verified with `./gradlew verifyPlugin`. We can consider adding this to CI later.

I made a few small improvements that simplify the build scripts:
* Some properties were removed because they duplicated content from `plugin.xml` (e.g., supported version numbers, plugin ID, and similar - all were unnecessarily overridden inside `intellij {}`/`intellijPlatform {}`).
* I replaced `prepareSandbox` with a separate task that is now a dependency of all `runIde` tasks, so there is no need to declare each case individually.
* From now on, properties are read via delegation instead of calling our custom `properties(...)` function. This is type-safe (if a property is not declared, the build will fail).
* I removed the `kotlin("test")` dependency, which we were only using for `assertTrue`.

The e2e Autocomplete tests are very flaky, and unfortunately, I haven’t been able to find a solution yet. I will try to address this in upcoming fixes.
I believe that ultimately we should have max one e2e test describing the happy path, and the rest of the features should be tested with unit tests.
Our e2e tests are very inconvenient, which results in no one running them (because we hijack the input), so they should be kept to a minimum.
The rest of the e2e tests were already disabled (I assume I know why :D), so I didn't touch them.

Fun fact: with the removal of the standard library, we managed to remove all unnecessary dependencies except for Sentry and PostHog (which are included for obvious reasons).
2025-07-28 20:39:44 +02:00
..
codeStyles update code styles 2024-10-21 17:30:13 -07:00
jsLinters fix: hardcode `fontSize` for tool call status msg 2025-05-12 16:36:40 -07:00
modules fix vscode activation failure with tasks, more jetbrains task updates 2024-10-29 15:18:14 -07:00
runConfigurations jetbrains test configurations 2025-05-09 21:16:36 -07:00
scopes update Continue search scope 2025-04-24 08:36:05 -07:00
.name fix vscode activation failure with tasks, more jetbrains task updates 2024-10-29 15:18:14 -07:00
compiler.xml settings and stuff 2025-04-21 17:33:37 -07:00
continue.iml provider factories, plugin, and package scripts 2024-10-24 12:20:34 -07:00
git_toolbox_blame.xml update default config 2024-10-17 14:23:10 -07:00
gradle.xml fix: use JAVA_HOME instead of macOS-specific JVM (#6778) 2025-07-24 12:46:47 -07:00
jarRepositories.xml Squash commits for JB integration testing 2024-12-17 09:12:33 -08:00
kotlinc.xml fix: Add file tests + migrate to IntelliJ Platform Gradle Plugin v2 2025-07-28 20:39:44 +02:00
misc.xml fix vscode activation failure with tasks, more jetbrains task updates 2024-10-29 15:18:14 -07:00
modules.xml fix vscode activation failure with tasks, more jetbrains task updates 2024-10-29 15:18:14 -07:00
prettier.xml fix: hardcode `fontSize` for tool call status msg 2025-05-12 16:36:40 -07:00
vcs.xml jetbrains test configurations 2025-05-09 21:16:36 -07:00