Skip to content

Commit fe08655

Browse files
committed
update platform version to 2025.2
1 parent 6a4dc33 commit fe08655

File tree

9 files changed

+260
-228
lines changed

9 files changed

+260
-228
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,4 @@ gradle-app.setting
138138
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
139139
hs_err_pid*
140140

141+
/.intellijPlatform/

build.gradle

Lines changed: 69 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id 'java-library'
3-
id 'org.jetbrains.intellij' version '1.17.4'
4-
id("org.jetbrains.kotlin.jvm") version "1.9.23"
3+
id 'org.jetbrains.intellij.platform' version '2.7.1'
4+
id("org.jetbrains.kotlin.jvm") version "2.2.0"
55
id 'org.jetbrains.changelog' version "1.3.1"
66
id "de.undercouch.download" version "4.0.2"
77
}
@@ -10,67 +10,94 @@ apply plugin: 'org.jetbrains.changelog'
1010

1111
group project.pluginGroup
1212
version (System.getenv('LD_VERSION')==null ? project.pluginVersion :System.getenv('LD_VERSION'))
13-
14-
sourceCompatibility = 11
15-
targetCompatibility = 11
16-
13+
kotlin {
14+
jvmToolchain(17)
15+
}
16+
java {
17+
sourceCompatibility = JavaVersion.VERSION_17
18+
targetCompatibility = JavaVersion.VERSION_17
19+
}
1720

1821
repositories {
1922
mavenLocal()
2023
maven { url 'https://jitpack.io' }
2124
mavenCentral()
25+
26+
intellijPlatform {
27+
defaultRepositories()
28+
}
2229
}
2330

2431
dependencies {
25-
api 'com.shuzijun:lc-sdk:0.0.3'
26-
api 'com.alibaba:fastjson:1.2.47'
27-
api 'org.jsoup:jsoup:1.11.3'
28-
api('io.sentry:sentry:1.7.9') {
32+
implementation 'com.shuzijun:lc-sdk:0.0.3'
33+
implementation 'com.alibaba:fastjson:1.2.47'
34+
implementation 'org.jsoup:jsoup:1.11.3'
35+
implementation('io.sentry:sentry:1.7.9') {
2936
exclude module: 'slf4j-api'
3037
}
31-
api 'org.scilab.forge:jlatexmath:1.0.7'
32-
api 'org.apache.commons:commons-lang3:3.9'
33-
api 'com.vladsch.flexmark:flexmark:0.62.2'
34-
api 'com.vladsch.flexmark:flexmark-ext-attributes:0.62.2'
35-
api 'io.github.biezhi:TinyPinyin:2.0.3.RELEASE'
36-
//api fileTree(dir: 'src/main/resources/lib', include: ['*.jar'])
37-
38+
implementation 'org.scilab.forge:jlatexmath:1.0.7'
39+
implementation 'org.apache.commons:commons-lang3:3.9'
40+
implementation 'com.vladsch.flexmark:flexmark:0.62.2'
41+
implementation 'com.vladsch.flexmark:flexmark-ext-attributes:0.62.2'
42+
implementation 'io.github.biezhi:TinyPinyin:2.0.3.RELEASE'
43+
44+
intellijPlatform {
45+
create(providers.gradleProperty('platformType'), providers.gradleProperty('platformVersion'))
46+
bundledPlugin('com.intellij.java')
47+
pluginVerifier()
48+
zipSigner()
49+
}
3850
}
3951

40-
// See https://github.com/JetBrains/gradle-intellij-plugin/
41-
intellij {
42-
pluginName = project.pluginName
43-
version = project.platformVersion
44-
type = project.platformType
45-
downloadSources = true
46-
updateSinceUntilBuild = false
47-
buildSearchableOptions.enabled = false
48-
ideaDependencyCachePath = "$gradle.gradleUserHomeDir/caches/modules-2/files-2.1/com.jetbrains.intellij.idea"
49-
50-
runIde {
51-
jvmArgs = project.runIdeJvmArgs.split(',').toList()
52+
// See https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html
53+
intellijPlatform {
54+
pluginConfiguration {
55+
name = project.pluginName
56+
version = project.pluginVersion
57+
58+
ideaVersion {
59+
sinceBuild = project.pluginSinceBuild
60+
untilBuild = project.pluginUntilBuild
61+
}
62+
63+
description = new File(project.pluginDescription).getText('UTF-8')
5264
}
53-
54-
patchPluginXml {
55-
sinceBuild = project.pluginSinceBuild
56-
untilBuild = project.pluginUntilBuild
57-
pluginDescription = new File(project.pluginDescription).getText('UTF-8')
58-
changeNotes.set(provider { changelog.get(project.version+".0").toHTML() })
65+
66+
signing {
67+
certificateChain = System.getenv("CERTIFICATE_CHAIN")
68+
privateKey = System.getenv("PRIVATE_KEY")
69+
password = System.getenv("PRIVATE_KEY_PASSWORD")
5970
}
60-
61-
publishPlugin {
62-
dependsOn("patchChangelog")
71+
72+
publishing {
6373
token = System.getenv("PUBLISH_TOKEN")
74+
channels = ["default"]
6475
}
65-
76+
77+
pluginVerification {
78+
ides {
79+
recommended()
80+
}
81+
}
82+
83+
buildSearchableOptions = false
6684
}
6785

6886
changelog {
87+
version = project.pluginVersion
88+
groups = []
89+
}
6990

91+
intellijPlatformTesting {
92+
runIde {
93+
register("runIdeTest") {
94+
task {
95+
jvmArgs = project.runIdeJvmArgs.split(',').toList()
96+
}
97+
}
98+
}
7099
}
71100

72101
tasks.withType(JavaCompile) {
73102
options.encoding = "UTF-8"
74-
}
75-
76-
103+
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ pluginGroup = com.shuzijun.leetcode
22
pluginName = keetcoder
33
pluginVersion = 8.14
44

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

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

1212
# ,-Dide.browser.jcef.log.level=verbose,-Duser.language=en-US
1313
runIdeJvmArgs = -Dfile.encoding=utf-8
Lines changed: 2 additions & 2 deletions
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-9.0.0-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
6-
zipStorePath=wrapper/dists
6+
zipStorePath=wrapper/dists

settings.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
pluginManagement {
1+
pluginManagement {
22
repositories {
3-
maven {
4-
url 'https://oss.sonatype.org/content/repositories/snapshots/'
5-
}
3+
mavenCentral()
64
gradlePluginPortal()
75
}
86
}
97

10-
rootProject.name = 'keetcoder'
8+
rootProject.name = 'leetcode-editor'
119

src/main/java/com/shuzijun/leetcode/plugin/listener/SupportCheck.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,28 @@
66
import com.intellij.openapi.application.ApplicationManager;
77
import com.intellij.openapi.project.DumbAware;
88
import com.intellij.openapi.project.Project;
9-
import com.intellij.openapi.startup.StartupActivity;
9+
import com.intellij.openapi.startup.ProjectActivity;
1010
import com.intellij.ui.jcef.JBCefApp;
1111
import com.shuzijun.leetcode.plugin.model.PluginConstant;
1212
import org.jetbrains.annotations.NotNull;
1313

1414
/**
1515
* @author shuzijun
1616
*/
17-
public class SupportCheck implements StartupActivity, DumbAware {
17+
public class SupportCheck implements ProjectActivity, DumbAware {
1818

1919
public static boolean isFirstProject = true;
2020

2121
@Override
22-
public void runActivity(@NotNull Project project) {
23-
if (ApplicationManager.getApplication().isUnitTestMode() || !isFirstProject ) {
24-
return;
22+
public Object execute(@NotNull Project project, @NotNull kotlin.coroutines.Continuation<? super kotlin.Unit> continuation) {
23+
if (ApplicationManager.getApplication().isUnitTestMode() || !isFirstProject) {
24+
continuation.resumeWith(kotlin.Unit.INSTANCE);
25+
return kotlin.Unit.INSTANCE;
2526
}
26-
if(!JBCefApp.isSupported()){
27+
if (!JBCefApp.isSupported()) {
2728
Notifications.Bus.notify(new Notification(PluginConstant.NOTIFICATION_GROUP, "Not Support JCEF", "Your environment does not support JCEF, cannot use LeetCode Editor.Check the Registry 'ide.browser.jcef.enabled'.", NotificationType.ERROR));
2829
}
30+
continuation.resumeWith(kotlin.Unit.INSTANCE);
31+
return kotlin.Unit.INSTANCE;
2932
}
30-
}
33+
}

src/main/kotlin/com/shuzijun/leetcode/plugin/listener/RegisterPluginInstallerStateListener.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import com.intellij.ide.util.PropertiesComponent
55
import com.intellij.openapi.extensions.PluginId
66
import com.intellij.openapi.fileEditor.impl.HTMLEditorProvider
77
import com.intellij.openapi.project.Project
8-
import com.intellij.openapi.startup.StartupActivity
8+
import com.intellij.openapi.startup.ProjectActivity
99
import com.shuzijun.leetcode.plugin.model.PluginConstant
1010
import com.shuzijun.leetcode.plugin.setting.PersistentConfig
1111

1212
/**
1313
* @author shuzijun
1414
*/
15-
class RegisterPluginInstallerStateListener : StartupActivity {
16-
override fun runActivity(project: Project) {
15+
class RegisterPluginInstallerStateListener : ProjectActivity {
16+
override suspend fun execute(project: Project) {
1717
val newVersion = getPlugin(PluginId.getId(PluginConstant.PLUGIN_ID))!!.version
1818
val config = PersistentConfig.getInstance().initConfig
1919
val oldVersion: String?
@@ -47,4 +47,4 @@ class RegisterPluginInstallerStateListener : StartupActivity {
4747
private const val CHANGELOGURL = "https://github.com/shuzijun/leetcode-editor/blob/master/CHANGELOG.md"
4848
}
4949

50-
}
50+
}

0 commit comments

Comments
 (0)