Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
CppCXY committed Sep 20, 2024
1 parent 4e58942 commit 026d5ce
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 12 deletions.
55 changes: 46 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -71,15 +105,18 @@ tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
targetCompatibility = "21"
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
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 {
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin>
<id>com.cppcxy.emmylua2.attach-debugger</id>
<name>EmmyLua Attach Debugger</name>
<version>2</version>
<name>EmmyLua2 Attach Debugger</name>
<version>2.0.0</version>
<vendor email="">CppCXY</vendor>

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

<depends>com.intellij.modules.platform</depends>
<depends>com.cppcxy</depends>
<depends>com.cppcxy.Intellij-EmmyLua</depends>

<extensions defaultExtensionNs="com.intellij">
<xdebugger.attachDebuggerProvider
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/META-INF/pluginIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 026d5ce

Please sign in to comment.