From abef5bc9fb3f74536b7e6a4bd5951997675f2f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E6=97=A5?= <451922429@qq.com> Date: Mon, 11 Aug 2025 18:41:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=20idea=202025.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 72 +++++++++++-------- gradle/wrapper/gradle-wrapper.properties | 2 +- .../java/com/sjhy/plugin/dict/GlobalDict.java | 2 +- ...alFileExportImportSettingsServiceImpl.java | 2 +- .../com/sjhy/plugin/tool/VelocityUtils.java | 2 +- src/main/resources/META-INF/plugin.xml | 9 ++- src/main/resources/defaultConfig.json | 2 +- 7 files changed, 54 insertions(+), 37 deletions(-) diff --git a/build.gradle b/build.gradle index ec91ef30..48a73f2e 100644 --- a/build.gradle +++ b/build.gradle @@ -10,52 +10,56 @@ buildscript { // 这两个插件是必备 plugins { id 'java' - id 'org.jetbrains.intellij' version '0.7.3' + id 'org.jetbrains.intellij.platform' version '2.7.1' } group 'com.sjhy' -version '1.2.9-java.RELEASE' +version '1.3.0-java.RELEASE' -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 compileJava.options.encoding = "UTF-8" compileTestJava.options.encoding = "UTF-8" repositories { mavenCentral() + intellijPlatform { + defaultRepositories() + } } // http://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system/prerequisites.html // https://plugins.jetbrains.com/docs/intellij/gradle-guide.html 官网gradle构建教程 - -intellij { -// 插件名称 - pluginName 'EasyCode' - // 沙箱目录位置,用于保存IDEA的设置,默认在build文件下面,防止clean,放在根目录下。 - sandboxDirectory = "${rootProject.rootDir}/idea-sandbox" - // 开发环境运行时使用的版本 - version '2021.2.2' - // 社区版 -// type 'IC' - // 企业版 - type 'IU' - // 各种IDEA版本去这里找 - // https://www.jetbrains.com/intellij-repository/releases - // 依赖的插件 - plugins = ['com.intellij.java', 'com.intellij.database'] - //Disables updating since-build attribute in plugin.xml - updateSinceUntilBuild false - downloadSources = true -} +// +//intellijPlatform { +//// 插件名称 +// pluginName = 'EasyCode' +// // 沙箱目录位置,用于保存IDEA的设置,默认在build文件下面,防止clean,放在根目录下。 +// //sandboxDirectory = "${rootProject.rootDir}/idea-sandbox" +// // 开发环境运行时使用的版本 +// version = '2025.1.1.1' +// // 社区版 +//// type 'IC' +// // 企业版 +// type = 'IU' +//// localPath = 'C:\\Users\\M\\AppData\\Local\\Programs\\IntelliJ IDEA Ultimate' // 根据实际安装路径调整 +// // 各种IDEA版本去这里找 +// // https://www.jetbrains.com/intellij-repository/releases +// // 依赖的插件 +// plugins = ['com.intellij.java', 'com.intellij.database'] +// //Disables updating since-build attribute in plugin.xml +// updateSinceUntilBuild = false +// downloadSources = true +//} dependencies { // jackson工具 - compile 'com.fasterxml.jackson.core:jackson-databind:2.9.6' + //compile 'com.fasterxml.jackson.core:jackson-databind:2.14.2' // guava工具 -// compile 'com.google.guava:guava:29.0-jre' + // implementation 'com.google.guava:guava:29.0-jre' // velocity支持 -// compile 'org.apache.velocity:velocity:1.7' +// implementation 'org.apache.velocity:velocity:2.3' // groovy支持 // compile 'org.codehaus.groovy:groovy:3.0.2' // beetl支持 @@ -63,10 +67,16 @@ dependencies { // freemarker支持 // compile 'org.freemarker:freemarker:2.3.30' // lombok 支持 - compileOnly 'org.projectlombok:lombok:1.18.2' - annotationProcessor 'org.projectlombok:lombok:1.18.2' - testAnnotationProcessor 'org.projectlombok:lombok:1.18.2' + compileOnly 'org.projectlombok:lombok:1.18.24' + annotationProcessor 'org.projectlombok:lombok:1.18.24' + testAnnotationProcessor 'org.projectlombok:lombok:1.18.24' // 测试用例 - testCompile 'junit:junit:4.12' + testImplementation 'junit:junit:4.13.2' + + intellijPlatform { + bundledPlugin 'com.intellij.java' + bundledPlugin 'com.intellij.database' + create('IU', '2025.1.1.1') + } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 59d220e3..b5c6f00c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://downloads.gradle.org/distributions/gradle-6.9-bin.zip +distributionUrl=https\://downloads.gradle.org/distributions/gradle-8.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/com/sjhy/plugin/dict/GlobalDict.java b/src/main/java/com/sjhy/plugin/dict/GlobalDict.java index 7c43f57d..dd379a8c 100644 --- a/src/main/java/com/sjhy/plugin/dict/GlobalDict.java +++ b/src/main/java/com/sjhy/plugin/dict/GlobalDict.java @@ -15,7 +15,7 @@ public interface GlobalDict { /** * 版本号 */ - String VERSION = "1.2.9"; + String VERSION = "1.3.0"; /** * 作者名称 */ diff --git a/src/main/java/com/sjhy/plugin/service/impl/LocalFileExportImportSettingsServiceImpl.java b/src/main/java/com/sjhy/plugin/service/impl/LocalFileExportImportSettingsServiceImpl.java index 60aa1dee..e4170d5f 100644 --- a/src/main/java/com/sjhy/plugin/service/impl/LocalFileExportImportSettingsServiceImpl.java +++ b/src/main/java/com/sjhy/plugin/service/impl/LocalFileExportImportSettingsServiceImpl.java @@ -62,7 +62,7 @@ public void exportConfig(SettingsStorageDTO settingsStorage) { // 发起通知 Notification notification = new Notification( - Notifications.SYSTEM_MESSAGES_GROUP_ID, + "System Messages", "Easy code notify", "Easy code config file export to", NotificationType.INFORMATION); diff --git a/src/main/java/com/sjhy/plugin/tool/VelocityUtils.java b/src/main/java/com/sjhy/plugin/tool/VelocityUtils.java index d9e887db..ce4f6c4c 100644 --- a/src/main/java/com/sjhy/plugin/tool/VelocityUtils.java +++ b/src/main/java/com/sjhy/plugin/tool/VelocityUtils.java @@ -26,7 +26,7 @@ public class VelocityUtils { // 设置初始化配置 INIT_PROP = new Properties(); // 修复部分用户的velocity日志记录无权访问velocity.log文件问题 - INIT_PROP.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.Log4JLogChute"); + INIT_PROP.setProperty("runtime.log.logsystem.class","org.apache.velocity.runtime.log.SLF4JLogChute"); INIT_PROP.setProperty("runtime.log.logsystem.log4j.logger", "velocity"); } diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 077f11a4..ff259fc1 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -20,6 +20,13 @@ 1.3.0-java.RELEASE

+ +

1.2.9-java.RELEASE