-
Notifications
You must be signed in to change notification settings - Fork 748
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
Migrate to IntelliJ Platform Gradle Plugin 2.0 #879
Merged
AlexPl292
merged 8 commits into
JetBrains:master
from
citizenmatt:feature/gradle-intellij-plugin-v2
Jun 21, 2024
Merged
Migrate to IntelliJ Platform Gradle Plugin 2.0 #879
AlexPl292
merged 8 commits into
JetBrains:master
from
citizenmatt:feature/gradle-intellij-plugin-v2
Jun 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
citizenmatt
commented
May 9, 2024
citizenmatt
force-pushed
the
feature/gradle-intellij-plugin-v2
branch
6 times, most recently
from
May 15, 2024 10:52
f274fff
to
5356fed
Compare
citizenmatt
force-pushed
the
feature/gradle-intellij-plugin-v2
branch
from
May 23, 2024 16:00
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 |
citizenmatt
force-pushed
the
feature/gradle-intellij-plugin-v2
branch
5 times, most recently
from
June 3, 2024 16:16
99b47a3
to
8b0a60b
Compare
citizenmatt
force-pushed
the
feature/gradle-intellij-plugin-v2
branch
from
June 10, 2024 19:53
8b0a60b
to
636ac29
Compare
citizenmatt
force-pushed
the
feature/gradle-intellij-plugin-v2
branch
6 times, most recently
from
June 12, 2024 17:17
b5fa0bc
to
b9c787c
Compare
citizenmatt
changed the title
WIP: Migrate to IntelliJ Platform Gradle Plugin 2.0
Migrate to IntelliJ Platform Gradle Plugin 2.0
Jun 12, 2024
Also updates the GitHub workflows to use the new name for the testIdeUi task, and the TeamCity files to use the new name for the VerifyPlugin task
The autobuilder action can't resolve the 'by project' property to know what our source compatibility is, so we need to give it a hint. If we don't, it will assume the lowest version compatible with the current version of Gradle, which right now is 11. This value doesn't have to match the `javaVersion` property, but has to allow us to resolve dependencies. Currently, we require at least version 17.
Let the Gradle plugin manage since-build, based on our target compile version. We leave until-build open ended
citizenmatt
force-pushed
the
feature/gradle-intellij-plugin-v2
branch
from
June 17, 2024 10:19
b9c787c
to
5eb0fae
Compare
OK. I'm happy for this to merge. All tasks are migrated and working as expected. There are a couple of minor tweaks to be made as things progress, but there's nothing blocking merge. |
That's a big refactoring! Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR migrates to the new IntelliJ Platform Gradle Plugin 2.0 (beta2). This is necessary to target 242, and also 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
.verifyPlugin
task nameverifyPlugin
task nametestIdeUi
task instead of previousrunIdeForUiTests
task namelib/src
folder.However, the task has been renamed from
createOpenApiSourcesJar
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. This task does not appear to be called externally, and thebuildPlugin
task's dependency has been updated to reflect the new name.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 fromplugin.xml
. It is now handled by the Gradle plugin, and is now in the format{branch}.{build}
. We would previously specify the third minor component, but this is not necessary (it might be different between IDEs).since-build
value frombuild.gradle.kts
. ThepatchPluginXml
uses the default value from the target IDE dependency.until-build
value is not written toplugin.xml
, as before.Other changes:
settings.gradle
has been migrated tosettings.gradle.kts
.intellijPlatform/
(Ivy XML files to reference bundled plugins, etc.) This folder is added to.gitignore
by project
property IdeaVim uses to specify thesourceCompatibility
version ingradle.properties
.By default it will choose the lowest version supported by the used version of Gradle, which means version 11. We add a comment in
build.gradle.kts
as a hint to help it choose the right version. This is not a new problem, but only causes an issue now because the new plugin has dependencies that require version 17, and won't resolve otherwise. We should perhaps look at whether we should just hard code the value inbuild.gradle.kts
instead of specifying it ingradle.properties
and then repeating it in the hint comment, or we replace the autobuild action with an action that explicitly specifies the version.build.gradle.kts
file has commented outrunIdeCustom
andrunIdeLocal
that can be edited and used to run the plugin in a different IDE, or to run the plugin in a locally installed IDE.Misc (not blockers):