-
Notifications
You must be signed in to change notification settings - Fork 1
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.1 #26
Conversation
intellijPlatform { | ||
instrumentCode = false | ||
} | ||
|
||
repositories { | ||
intellijPlatform { | ||
defaultRepositories() | ||
jetbrainsRuntime() | ||
} | ||
} | ||
|
||
dependencies { | ||
intellijPlatform { | ||
intellijIdeaCommunity(ideaVersion, useInstaller = false) | ||
jetbrainsRuntime() | ||
bundledPlugins("com.intellij.java", "org.jetbrains.kotlin") | ||
testFramework(TestFrameworkType.Bundled) | ||
} |
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.
Unfortunately, I don't know a proper way how not to duplicate these lines if do everything as expected, i.e., not apply org.jetbrains.intellij.platform
at the top-level where it's unnecessary, and use org.jetbrains.intellij.platform.module
plugin for common
module since common
is not a plugin itself but just a part of it
- add explicit dependency on junit lib - add explicit dependency on platform test framework - use `java-test-fixtures` plugin to share common test code from `common` module across other modules
bb9363c
to
632fc7a
Compare
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.
Unfortunately(?), I'm not an experienced Kotlin programmer, but I confirm that this patch fixes the course.
2.x version is supposed to solve a lot of long-standing problems that 1.x plugin has.
Moreover, it's the only way to properly build IntelliJ plugin the platform starting from 2024.3
The most interesting thing except migration itself is using
java-test-fixtures
plugin to share common test code fromcommon
module. Starting with 2.0 version of intellij-platform gradle plugin, it's not possible to use test dependencies inmain
source root as it was before, only in test ones. Buttest
source root is not supposed to be shared. So I use a separate Gradle plugin created exactly to solve the issue with sharing test code between different modulesWhat I intentionally didn't do in this PR: