From 026d5ceea7f64445f182eb3fac1994d4b734f3ce Mon Sep 17 00:00:00 2001 From: CppCXY <812125110@qq.com> Date: Fri, 20 Sep 2024 15:10:05 +0800 Subject: [PATCH] update version --- build.gradle.kts | 55 ++++++++++++++++++---- src/main/resources/META-INF/plugin.xml | 6 +-- src/main/resources/META-INF/pluginIcon.svg | 1 + 3 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 src/main/resources/META-INF/pluginIcon.svg diff --git a/build.gradle.kts b/build.gradle.kts index 1761a2b..700d397 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,20 +23,54 @@ plugins { id("de.undercouch.download").version("5.3.0") } +data class BuildData( + val ideaSDKShortVersion: String, + // https://www.jetbrains.com/intellij-repository/releases + val ideaSDKVersion: String, + val sinceBuild: String, + val untilBuild: String, + val archiveName: String = "EmmyLua2-AttachDebugger", + val jvmTarget: String = "17", + val targetCompatibilityLevel: JavaVersion = JavaVersion.VERSION_17, + // https://github.com/JetBrains/gradle-intellij-plugin/issues/403#issuecomment-542890849 + val instrumentCodeCompilerVersion: String = ideaSDKVersion, + val type: String = "IU" +) + +val buildDataList = listOf( + BuildData( + ideaSDKShortVersion = "242", + ideaSDKVersion = "2024.2", + sinceBuild = "232", + untilBuild = "242.*", + ) +) + +group = "com.cppcxy" +val emmyluaDebuggerVersion = "1.8.2" +val emmyluaDebuggerProjectUrl = "https://github.com/EmmyLua/EmmyLuaDebugger" + +val buildVersion = System.getProperty("IDEA_VER") ?: buildDataList.first().ideaSDKShortVersion + +val buildVersionData = buildDataList.find { it.ideaSDKShortVersion == buildVersion }!! + +val runnerNumber = System.getenv("RUNNER_NUMBER") ?: "Dev" + +version = "${emmyluaDebuggerVersion}.${runnerNumber}-IDEA${buildVersion}" + repositories { mavenCentral() } intellij { pluginName.set("EmmyLua2-AttachDebugger") - version.set("2023.3") - type.set("IC") // Target IDE Platform - sandboxDir.set("${project.buildDir}/idea-sandbox") + version.set(buildVersionData.ideaSDKVersion) + type.set(buildVersionData.type) // Target IDE Platform + sandboxDir.set("${project.buildDir}/${buildVersionData.ideaSDKShortVersion}/idea-sandbox") plugins.set(listOf("com.cppcxy.Intellij-EmmyLua:0.7.1.20-IDEA242")) } -val emmyluaDebuggerVersion = "1.8.2" -val emmyluaDebuggerProjectUrl = "https://github.com/EmmyLua/EmmyLuaDebugger" + task("downloadDebugger", type = Download::class) { src(arrayOf( @@ -71,15 +105,18 @@ tasks { // Set the JVM compatibility versions withType { sourceCompatibility = "17" - targetCompatibility = "17" + targetCompatibility = "21" } withType { - kotlinOptions.jvmTarget = "17" + kotlinOptions.jvmTarget = buildVersionData.jvmTarget + } + instrumentCode { + compilerVersion.set(buildVersionData.instrumentCodeCompilerVersion) } patchPluginXml { - sinceBuild.set("233") - untilBuild.set("242.*") + sinceBuild.set(buildVersionData.sinceBuild) + untilBuild.set(buildVersionData.untilBuild) } signPlugin { diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 653632f..638c0c7 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -1,7 +1,7 @@ com.cppcxy.emmylua2.attach-debugger - EmmyLua Attach Debugger - 2 + EmmyLua2 Attach Debugger + 2.0.0 CppCXY com.intellij.modules.platform - com.cppcxy + com.cppcxy.Intellij-EmmyLua emmy \ No newline at end of file