Skip to content

Commit 026d5ce

Browse files
committed
update version
1 parent 4e58942 commit 026d5ce

File tree

3 files changed

+50
-12
lines changed

3 files changed

+50
-12
lines changed

build.gradle.kts

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,54 @@ plugins {
2323
id("de.undercouch.download").version("5.3.0")
2424
}
2525

26+
data class BuildData(
27+
val ideaSDKShortVersion: String,
28+
// https://www.jetbrains.com/intellij-repository/releases
29+
val ideaSDKVersion: String,
30+
val sinceBuild: String,
31+
val untilBuild: String,
32+
val archiveName: String = "EmmyLua2-AttachDebugger",
33+
val jvmTarget: String = "17",
34+
val targetCompatibilityLevel: JavaVersion = JavaVersion.VERSION_17,
35+
// https://github.com/JetBrains/gradle-intellij-plugin/issues/403#issuecomment-542890849
36+
val instrumentCodeCompilerVersion: String = ideaSDKVersion,
37+
val type: String = "IU"
38+
)
39+
40+
val buildDataList = listOf(
41+
BuildData(
42+
ideaSDKShortVersion = "242",
43+
ideaSDKVersion = "2024.2",
44+
sinceBuild = "232",
45+
untilBuild = "242.*",
46+
)
47+
)
48+
49+
group = "com.cppcxy"
50+
val emmyluaDebuggerVersion = "1.8.2"
51+
val emmyluaDebuggerProjectUrl = "https://github.com/EmmyLua/EmmyLuaDebugger"
52+
53+
val buildVersion = System.getProperty("IDEA_VER") ?: buildDataList.first().ideaSDKShortVersion
54+
55+
val buildVersionData = buildDataList.find { it.ideaSDKShortVersion == buildVersion }!!
56+
57+
val runnerNumber = System.getenv("RUNNER_NUMBER") ?: "Dev"
58+
59+
version = "${emmyluaDebuggerVersion}.${runnerNumber}-IDEA${buildVersion}"
60+
2661
repositories {
2762
mavenCentral()
2863
}
2964

3065
intellij {
3166
pluginName.set("EmmyLua2-AttachDebugger")
32-
version.set("2023.3")
33-
type.set("IC") // Target IDE Platform
34-
sandboxDir.set("${project.buildDir}/idea-sandbox")
67+
version.set(buildVersionData.ideaSDKVersion)
68+
type.set(buildVersionData.type) // Target IDE Platform
69+
sandboxDir.set("${project.buildDir}/${buildVersionData.ideaSDKShortVersion}/idea-sandbox")
3570
plugins.set(listOf("com.cppcxy.Intellij-EmmyLua:0.7.1.20-IDEA242"))
3671
}
3772

38-
val emmyluaDebuggerVersion = "1.8.2"
39-
val emmyluaDebuggerProjectUrl = "https://github.com/EmmyLua/EmmyLuaDebugger"
73+
4074

4175
task("downloadDebugger", type = Download::class) {
4276
src(arrayOf(
@@ -71,15 +105,18 @@ tasks {
71105
// Set the JVM compatibility versions
72106
withType<JavaCompile> {
73107
sourceCompatibility = "17"
74-
targetCompatibility = "17"
108+
targetCompatibility = "21"
75109
}
76110
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
77-
kotlinOptions.jvmTarget = "17"
111+
kotlinOptions.jvmTarget = buildVersionData.jvmTarget
112+
}
113+
instrumentCode {
114+
compilerVersion.set(buildVersionData.instrumentCodeCompilerVersion)
78115
}
79116

80117
patchPluginXml {
81-
sinceBuild.set("233")
82-
untilBuild.set("242.*")
118+
sinceBuild.set(buildVersionData.sinceBuild)
119+
untilBuild.set(buildVersionData.untilBuild)
83120
}
84121

85122
signPlugin {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<idea-plugin>
22
<id>com.cppcxy.emmylua2.attach-debugger</id>
3-
<name>EmmyLua Attach Debugger</name>
4-
<version>2</version>
3+
<name>EmmyLua2 Attach Debugger</name>
4+
<version>2.0.0</version>
55
<vendor email="">CppCXY</vendor>
66

77
<description><![CDATA[
@@ -17,7 +17,7 @@
1717
<idea-version since-build="233.3"/>
1818

1919
<depends>com.intellij.modules.platform</depends>
20-
<depends>com.cppcxy</depends>
20+
<depends>com.cppcxy.Intellij-EmmyLua</depends>
2121

2222
<extensions defaultExtensionNs="com.intellij">
2323
<xdebugger.attachDebuggerProvider
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)