-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Migrate to IntelliJ Platform Gradle Plugin 2.0 #879
base: master
Are you sure you want to change the base?
WIP: Migrate to IntelliJ Platform Gradle Plugin 2.0 #879
Conversation
// TODO: Robot server task not yet available | ||
// downloadRobotServerPlugin { | ||
// version.set(remoteRobotVersion) | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's supposed to happen with this task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The downloadRobotServerPlugin
is removed. The Robot Server Plugin will be added through the dependencies {}
block.
ATM, the testIdeUI
and testIdePerformance
tasks are not available yet, but they will be there soon!
// systemProperty("jb.consents.confirmation.enabled", "false") | ||
// systemProperty("ide.show.tips.on.startup.default.value", "false") | ||
// systemProperty("octopus.handler", System.getProperty("octopus.handler") ?: true) | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this task? I don't know how the current UI tests work...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WIP, tasks will be available soon.
// TODO: Do we need this to be here *and* in plugin.xml? | ||
sinceBuild.set("233.11799.67") | ||
untilBuild.set(provider { null }) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we set since-build
here, will the Plugin DevKit use it for analysis? We have it duplicated in plugin.xml
right now, it would be nice to only set in one place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can set it in Gradle build file only. Those values are used by the patchPluginXml
file to update the plugin.xml
file. All further checks performed by the Gradle plugin respect those values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the DevKit though? Does it look at the patched or unpatched plugin.xml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some tests, it seems that DevKit only uses the value in the unpatched plugin.xml
, so it's still worth keeping both values, even though it would make things easier to specify only in the build scripts
instrumentationTools() | ||
|
||
testFramework(TestFrameworkType.Platform.JUnit4) | ||
testFramework(TestFrameworkType.Platform.JUnit5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems unexpected to require two frameworks, but it fails with only one, and runs with two, so...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fails how?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either unresolved items (the @RunInEdt
annotation) or runtime failures, also about the wrong threading models. Is it expected to require two frameworks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unexpected. I'll take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current state: IdeaVim uses JUnit 5 features, so requires the JUnit5
test framework type. However, some standard test functionality, such as EditorTestUtil
and LightProjectDescriptor
are only defined in JUnit4
, so it looks like both test frameworks are required, and any change would need to come from the platform.
f274fff
to
5356fed
Compare
5356fed
to
2ec7a33
Compare
As a not, we HAVE to use 2.0 to target 242: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#usage |
b272bbf
to
e8150ee
Compare
e8150ee
to
99b47a3
Compare
99b47a3
to
8b0a60b
Compare
This PR migrates to the new IntelliJ Platform Gradle Plugin 2.0 (beta2). This is necessary to target 242, but more importantly, allows us to use "split mode" to reproduce and debug remote development issues. It's also easier to configure, and makes it easy to run the plugin in a different IDE, even locally built or installed IDEs.
It is still a work in progress, and not yet ready to merge. I will be actively updating and force-pushing changes into this branch.
The following build features work as expected:
AceJump
(optional) dependency:test
,vim-engine:test
, andjava-tests:test
long-running-tests
andproperty-tests
(there are failures, but these matchmaster
)runPluginVerifier
toverifyPlugin
, so the "IdeaVim full verification" run configuration has been updatedlib/src
folder. However, the task has been renamed fromcreateOpenApiSourcesJar
tosourcesJar
, and the filename is nowIdeaVIM-{version}-sources.jar
instead ofIdeaVIM-{version}-src.jar
. This reflects the behaviour of the task set up with the Gradlejava.withSourcesJar()
helper in thevim-engine
module. The file is still created in thelib/src
folder, and as the documentation states, there are no strict naming rules for the files in this directory.runIdeSplitMode
task and equivalent "Start IJ with IdeaVim (Split Mode)" run configuration have been added, to run the IDE in split mode, with the plugin loaded in the frontend, as per remote dev/CWM.Split mode requires 242+ and the project is currently targeting 241. This task runs the current EAP, specified by version in
gradle.properties
. This version number will be updated for each EAP until 2024.2 is released. Once IdeaVim targets 2024.2, we can remove this version and let therunIdeSplitMode
run with the version it is compiled against.since-build
value is specified in bothbuild.gradle.kts
andplugin.xml
. It would be better to specify it just once, and have the DevKit and the plugin verifier automatically pick this up from a single sourceOther changes:
settings.gradle
has been migrated tosettings.gradle.kts
.intellijPlatform/
(Ivy XML files to reference bundled plugins, etc.) This folder is added to.gitignore
runPluginVerifier
->verifyPlugin
andcreateOpenApiSourcesJar
->sourcesJar
.There are also the following IdeaVim issues, which aren't required for this PR, but should be noted and fixed at some point:
annotation-processors.jar
, which is not required at run timecodeql-cli-2.17.4
, but this doesn't appear to be used/released yet.