Skip to content

Commit 968470e

Browse files
committed
Gradle updates and fixes for newer IntelliJ versions
1 parent f78b276 commit 968470e

File tree

7 files changed

+51
-22
lines changed

7 files changed

+51
-22
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build
22
.gradle
3-
*.iml
3+
*.iml
4+
.intellijPlatform

.idea/kotlinc.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

+28-16
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
11
plugins {
2-
kotlin("jvm") version "1.6.10"
3-
id("org.jetbrains.intellij") version "1.4.0"
2+
kotlin("jvm") version "1.9.25"
3+
id("org.jetbrains.intellij.platform") version "2.0.1"
44
}
55

66
group = "org.example"
7-
version = "0.1.3"
7+
version = "0.1.4"
88

99
repositories {
1010
mavenCentral()
11+
12+
intellijPlatform {
13+
defaultRepositories()
14+
}
1115
}
1216

1317
dependencies {
14-
implementation(kotlin("stdlib"))
15-
}
18+
intellijPlatform {
19+
create("IU", "2024.2")
20+
bundledPlugins(listOf("JavaScript", "org.jetbrains.plugins.sass"))
1621

17-
// See https://github.com/JetBrains/gradle-intellij-plugin/
18-
intellij {
19-
type.set("IU")
20-
plugins.set(listOf("JavaScriptLanguage", "sass"))
21-
version.set("LATEST-EAP-SNAPSHOT")
22-
updateSinceUntilBuild.set(false)
22+
pluginVerifier()
23+
zipSigner()
24+
instrumentationTools()
25+
}
2326
}
2427

25-
tasks {
26-
patchPluginXml {
27-
version.set(project.version.toString())
28-
sinceBuild.set("212.0")
28+
// See https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
29+
intellijPlatform {
30+
pluginConfiguration {
31+
ideaVersion {
32+
sinceBuild = "223"
33+
untilBuild = provider { null }
34+
}
2935
}
30-
}
36+
37+
pluginVerification {
38+
ides {
39+
recommended()
40+
}
41+
}
42+
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/kotlin/de/rakhman/angular_split_buttons/OpenAngularActions.kt

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package de.rakhman.angular_split_buttons
22

33
import com.intellij.icons.AllIcons
4+
import com.intellij.openapi.actionSystem.ActionUpdateThread
45
import com.intellij.openapi.actionSystem.AnAction
56
import com.intellij.openapi.actionSystem.AnActionEvent
67
import com.intellij.openapi.actionSystem.CommonDataKeys
@@ -38,7 +39,7 @@ abstract class AbstractOpenAngularAction(
3839

3940
// find existing window where the sibling file is opened and which is not the window
4041
// where the action was performed
41-
val window = fileEditorManager.splitters.windows.firstOrNull {
42+
val window = fileEditorManager.splitters.windows().firstOrNull {
4243
!it.hasEditor(myEditor) && it.hasFile(siblingFile)
4344
}
4445

@@ -48,10 +49,10 @@ abstract class AbstractOpenAngularAction(
4849
} else {
4950
// otherwise, split the current window
5051
val currentWindow =
51-
fileEditorManager.splitters.windows.firstOrNull { it.hasEditor(myEditor) }
52+
fileEditorManager.splitters.windows().firstOrNull { it.hasEditor(myEditor) }
5253
?: fileEditorManager.currentWindow
5354

54-
currentWindow.split(
55+
currentWindow?.split(
5556
JSplitPane.HORIZONTAL_SPLIT,
5657
false,
5758
siblingFile,
@@ -72,6 +73,10 @@ abstract class AbstractOpenAngularAction(
7273
private fun hasMatchingExtension(file: PsiFile): Boolean {
7374
return file.name.substringAfterLast(".").lowercase() in extensions
7475
}
76+
77+
override fun getActionUpdateThread(): ActionUpdateThread {
78+
return ActionUpdateThread.BGT
79+
}
7580
}
7681

7782

src/main/resources/META-INF/plugin.xml

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
]]></description>
1212

1313
<change-notes><![CDATA[
14+
0.1.4
15+
<ul>
16+
<li>Updated for newer versions of IntelliJ IDEA and WebStorm</li>
17+
</ul>
18+
1419
0.1.3
1520
<ul>
1621
<li>Fix usage of deprecated symbols</li>

0 commit comments

Comments
 (0)