Skip to content

Commit 8c8eef6

Browse files
committed
fix #756
1 parent 653345c commit 8c8eef6

16 files changed

+209
-103
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ hs_err_pid*
5151
# Gradle
5252
.idea/**/gradle.xml
5353
.idea/**/libraries
54+
.intellijPlatform
5455

5556
# Gradle and Maven with auto-import
5657
# When using Gradle or Maven with auto-import, you should exclude module files,

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@
77
[![捐赠][badge:donate-zh]][shuzijun-donate]
88
[![内推][badge:referrals]][shuzijun-referrals]
99

10+
## 8.15.0
11+
12+
### Added
13+
14+
### Changed
15+
16+
### Deprecated
17+
18+
### Fixed
19+
- fix [#756](https://github.com/shuzijun/leetcode-editor/issues/756)
20+
### Removed
21+
22+
23+
1024
## 8.14.0
1125

1226
### Added

build.gradle

Lines changed: 0 additions & 76 deletions
This file was deleted.

build.gradle.kts

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
import org.jetbrains.changelog.Changelog
2+
import org.jetbrains.changelog.markdownToHTML
3+
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
4+
5+
plugins {
6+
id("java") // Java support
7+
alias(libs.plugins.kotlin) // Kotlin support
8+
alias(libs.plugins.intelliJPlatform) version "2.7.1" // IntelliJ Platform Gradle Plugin
9+
alias(libs.plugins.changelog) // Gradle Changelog Plugin
10+
}
11+
12+
group = providers.gradleProperty("pluginGroup").get()
13+
version = System.getenv("LD_VERSION") ?: providers.gradleProperty("pluginVersion").get()
14+
15+
// Set the JVM language level used to build the project.
16+
kotlin {
17+
jvmToolchain(17)
18+
}
19+
20+
// Configure project's dependencies
21+
repositories {
22+
mavenLocal()
23+
maven("https://jitpack.io")
24+
mavenCentral()
25+
26+
// IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
27+
intellijPlatform {
28+
defaultRepositories()
29+
}
30+
}
31+
32+
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
33+
dependencies {
34+
api("com.shuzijun:lc-sdk:0.0.3")
35+
api("com.alibaba:fastjson:1.2.47")
36+
api("org.jsoup:jsoup:1.11.3")
37+
api("io.sentry:sentry:1.7.9") {
38+
exclude(module = "slf4j-api")
39+
}
40+
api("org.scilab.forge:jlatexmath:1.0.7")
41+
api("org.apache.commons:commons-lang3:3.9")
42+
api("com.vladsch.flexmark:flexmark:0.62.2")
43+
api("com.vladsch.flexmark:flexmark-ext-attributes:0.62.2")
44+
api("io.github.biezhi:TinyPinyin:2.0.3.RELEASE")
45+
// api(fileTree(mapOf("dir" to "src/main/resources/lib", "include" to listOf("*.jar"))))
46+
47+
testImplementation(libs.junit)
48+
testImplementation(libs.opentest4j)
49+
50+
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
51+
intellijPlatform {
52+
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))
53+
54+
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
55+
//bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })
56+
57+
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
58+
//plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })
59+
60+
// Module Dependencies. Uses `platformBundledModules` property from the gradle.properties file for bundled IntelliJ Platform modules.
61+
//bundledModules(providers.gradleProperty("platformBundledModules").map { it.split(',') })
62+
63+
testFramework(TestFrameworkType.Platform)
64+
}
65+
}
66+
67+
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
68+
intellijPlatform {
69+
pluginConfiguration {
70+
name = providers.gradleProperty("pluginName")
71+
version = project.version.toString()
72+
73+
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
74+
description = providers.fileContents(layout.projectDirectory.file(providers.gradleProperty("pluginDescription").get())).toString()
75+
76+
val changelog = project.changelog // local variable for configuration cache compatibility
77+
// Get the latest available change notes from the changelog file
78+
changeNotes = with(changelog) {
79+
renderItem(
80+
(getOrNull(project.version.toString() + ".0") ?: getUnreleased())
81+
.withHeader(false)
82+
.withEmptySections(false),
83+
Changelog.OutputType.HTML,
84+
)
85+
}
86+
87+
ideaVersion {
88+
sinceBuild = providers.gradleProperty("pluginSinceBuild")
89+
}
90+
}
91+
92+
publishing {
93+
token = providers.environmentVariable("PUBLISH_TOKEN")
94+
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
95+
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
96+
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
97+
channels = providers.gradleProperty("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
98+
}
99+
100+
pluginVerification {
101+
ides {
102+
recommended()
103+
}
104+
}
105+
}
106+
107+
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
108+
changelog {
109+
groups.empty()
110+
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
111+
}
112+
113+
114+
tasks {
115+
wrapper {
116+
gradleVersion = providers.gradleProperty("gradleVersion").get()
117+
}
118+
119+
publishPlugin {
120+
dependsOn(patchChangelog)
121+
}
122+
}
123+
124+
intellijPlatformTesting {
125+
runIde {
126+
register("runIdeForUiTests") {
127+
task {
128+
jvmArgumentProviders += CommandLineArgumentProvider {
129+
listOf(
130+
"-Dfile.encoding=utf-8"
131+
)
132+
}
133+
}
134+
135+
plugins {
136+
robotServerPlugin()
137+
}
138+
}
139+
}
140+
}

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
pluginGroup = com.shuzijun.leetcode
22
pluginName = leetcode-editor
3-
pluginVersion = 8.14
3+
pluginVersion = 8.15
44

5-
pluginSinceBuild = 203.0
5+
pluginSinceBuild = 223.0
66
pluginUntilBuild =
77
pluginDescription = doc/description.html
88

99
platformType = IU
10-
platformVersion = 2022.2
10+
platformVersion = 2022.3
1111

1212
# ,-Dide.browser.jcef.log.level=verbose,-Duser.language=en-US
1313
runIdeJvmArgs = -Dfile.encoding=utf-8

gradle/libs.versions.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[versions]
2+
# libraries
3+
junit = "4.13.2"
4+
opentest4j = "1.3.0"
5+
6+
# plugins
7+
changelog = "2.4.0"
8+
intelliJPlatform = "2.7.1"
9+
kotlin = "2.2.0"
10+
kover = "0.9.1"
11+
qodana = "2025.1.1"
12+
13+
[libraries]
14+
junit = { group = "junit", name = "junit", version.ref = "junit" }
15+
opentest4j = { group = "org.opentest4j", name = "opentest4j", version.ref = "opentest4j" }
16+
17+
[plugins]
18+
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
19+
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }
20+
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
21+
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
22+
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

settings.gradle

Lines changed: 0 additions & 11 deletions
This file was deleted.

settings.gradle.kts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
pluginManagement {
2+
repositories {
3+
maven {
4+
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
5+
}
6+
gradlePluginPortal()
7+
}
8+
}
9+
10+
plugins {
11+
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
12+
}
13+
14+
rootProject.name = "leetcode-editor"
15+

src/main/java/com/shuzijun/leetcode/plugin/actions/toolbar/FindActionGroup.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,11 @@ public void update(AnActionEvent e) {
4141
for (Tag tag : tags) {
4242
if (tag.isSelect()) {
4343
e.getPresentation().setIcon(LeetCodeEditorIcons.FILTER);
44-
navigatorAction.updateUI();
4544
return;
4645
}
4746
}
4847
}
4948
e.getPresentation().setIcon(null);
50-
navigatorAction.updateUI();
5149
}
5250

5351

@@ -102,6 +100,6 @@ private String getKey(String id) {
102100

103101
@Override
104102
public @NotNull ActionUpdateThread getActionUpdateThread() {
105-
return ActionUpdateThread.BGT;
103+
return ActionUpdateThread.EDT;
106104
}
107105
}

0 commit comments

Comments
 (0)