Skip to content

Commit b5b52ff

Browse files
Increase Compatibility
- Make sure that the plugin can be installed on newer IntelliJ version and also for more IntelliJ platform. - Add some documentation to develop with IntelliJ or Neovim
1 parent 384d465 commit b5b52ff

File tree

4 files changed

+50
-22
lines changed

4 files changed

+50
-22
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.gradle
2+
.intellijPlatform/
23
build/
34
!gradle/wrapper/gradle-wrapper.jar
45
!**/src/main/**/build/
@@ -39,4 +40,4 @@ bin/
3940
.vscode/
4041

4142
### Mac OS ###
42-
.DS_Store
43+
.DS_Store

DEVELOPMENT.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# IntelliJ plugin
2+
3+
Make sure you have at least a JDK 17 installed on your machine and that the
4+
`JAVA_HOME` variable points to the JDK's home directory.
5+
6+
## How to run locally (without IDE)
7+
8+
`./gradlew runIde --no-daemon` directly builds & starts a sandboxed IntelliJ
9+
IDEA with the plugin enabled.
10+
11+
## Install into existing IDE
12+
13+
`./gradlew buildPlugin` creates in `build/distributions/` a ZIP archive that
14+
can be installed in IntelliJ's plugin settings with the option “Install Plugin
15+
from Disk”.
16+
17+
## Develop with IntelliJ
18+
19+
Just open the project and use “Run Plugin” in the run drop down.
20+
21+
## Develop with Neovim
22+
23+
- Make sure to enable [`kotlin_language_server` from nvim-lspconfig][nvim-kls].
24+
- Overwrite `cmd` by following [this fix][kls-fix] ([use the new Kotlin language server][community-kls]
25+
because this language server is better maintained works with this plugin)
26+
27+
[nvim-kls]: https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#kotlin_language_server
28+
[kls-fix]: https://github.com/fwcd/kotlin-language-server/issues/600#issuecomment-2471327399
29+
[community-kls]: https://github.com/kotlin-community-tools/kotlin-language-server

build.gradle.kts

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,41 @@
11
plugins {
22
id("java")
3-
id("org.jetbrains.kotlin.jvm") version "1.9.25"
4-
id("org.jetbrains.intellij") version "1.17.4"
3+
// Do not upgrade until following has been fixed:
4+
// https://github.com/kotlin-community-tools/kotlin-language-server/pull/17
5+
id("org.jetbrains.kotlin.jvm") version "2.0.21"
6+
id("org.jetbrains.intellij.platform") version "2.2.1"
57
}
68

79
group = "io.github.ethersync"
8-
version = "1.0-SNAPSHOT"
10+
version = "0.7.0-SNAPSHOT"
911

1012
repositories {
1113
mavenCentral()
14+
15+
intellijPlatform {
16+
defaultRepositories()
17+
}
1218
}
1319

1420
dependencies {
21+
intellijPlatform {
22+
intellijIdeaCommunity("2024.3.1.1")
23+
bundledPlugin("org.jetbrains.plugins.terminal")
24+
}
25+
1526
implementation("org.eclipse.lsp4j:org.eclipse.lsp4j:0.23.1")
1627
implementation("org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.23.1")
1728
}
1829

19-
// Configure Gradle IntelliJ Plugin
20-
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
21-
intellij {
22-
version.set("2023.2.8")
23-
type.set("IC") // Target IDE Platform
24-
25-
plugins.set(listOf("terminal"))
30+
kotlin {
31+
compilerOptions {
32+
jvmToolchain(17)
33+
}
2634
}
2735

2836
tasks {
29-
// Set the JVM compatibility versions
30-
withType<JavaCompile> {
31-
sourceCompatibility = "17"
32-
targetCompatibility = "17"
33-
}
34-
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
35-
kotlinOptions.jvmTarget = "17"
36-
}
37-
3837
patchPluginXml {
3938
sinceBuild.set("232")
40-
untilBuild.set("242.*")
4139
}
4240

4341
signPlugin {

src/main/kotlin/io/github/ethersync/StartEthersyncDaemonTerminalShellCommandHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ class StartEthersyncDaemonTerminalShellCommandHandler : TerminalShellCommandHand
3535

3636
return rest.startsWith("daemon")
3737
}
38-
}
38+
}

0 commit comments

Comments
 (0)