ci: Update gradle platform plugin

This commit is contained in:
FalsePattern 2024-07-25 00:54:44 +02:00
parent aeb54fc752
commit e924b896ef
Signed by: falsepattern
GPG key ID: E930CDEC50C50E23
2 changed files with 8 additions and 48 deletions

View file

@ -14,7 +14,7 @@ plugins {
java java
`maven-publish` `maven-publish`
`java-library` `java-library`
id("org.jetbrains.intellij.platform") version("2.0.0-beta8") id("org.jetbrains.intellij.platform") version("2.0.0-rc1")
id("org.jetbrains.changelog") version("2.2.1") id("org.jetbrains.changelog") version("2.2.1")
id("org.jetbrains.grammarkit") version("2022.3.2.2") id("org.jetbrains.grammarkit") version("2022.3.2.2")
id("de.undercouch.download") version("5.6.0") id("de.undercouch.download") version("5.6.0")
@ -100,7 +100,7 @@ allprojects {
annotationProcessor("org.projectlombok:lombok:1.18.32") annotationProcessor("org.projectlombok:lombok:1.18.32")
if (path !in listOf(":", ":plugin", ":debugger")) { if (path !in listOf(":", ":plugin", ":debugger")) {
intellijPlatform { intellijPlatform {
intellijIdeaCommunity(ideaVersion) intellijIdeaCommunity(ideaVersion, useInstaller = false)
} }
} }
} }
@ -228,7 +228,7 @@ project(":debugger") {
exclude("com.google.code.gson", "gson") exclude("com.google.code.gson", "gson")
} }
intellijPlatform { intellijPlatform {
clion(clionVersion) clion(clionVersion, useInstaller = false)
for (p in clionPlugins) { for (p in clionPlugins) {
bundledPlugin(p) bundledPlugin(p)
} }
@ -278,8 +278,8 @@ project(":plugin") {
zipSigner() zipSigner()
pluginVerifier() pluginVerifier()
when (baseIDE) { when (baseIDE) {
"idea" -> intellijIdeaCommunity(ideaVersion) "idea" -> intellijIdeaCommunity(ideaVersion, useInstaller = false)
"clion" -> clion(clionVersion) "clion" -> clion(clionVersion, useInstaller = false)
} }
plugin(lsp4ijPluginString) plugin(lsp4ijPluginString)
} }
@ -326,56 +326,16 @@ project(":plugin") {
} }
} }
// Include the generated files in the source set
// Collects all jars produced by compilation of project modules and merges them into singe one.
// We need to put all plugin manifest files into single jar to make new plugin model work
val mergePluginJarTask = task<Jar>("mergePluginJars") {
duplicatesStrategy = DuplicatesStrategy.FAIL
archiveBaseName.set("ZigBrains")
exclude("META-INF/MANIFEST.MF")
exclude("**/classpath.index")
val pluginLibDir by lazy {
val sandboxTask = tasks.prepareSandbox.get()
sandboxTask.destinationDir.resolve("${project.extensionProvider.map { it.projectName }.get()}/lib")
}
val pluginJars by lazy {
pluginLibDir.listFiles().orEmpty().filter { it.isPluginJar() }
}
destinationDirectory.set(project.layout.dir(provider { pluginLibDir }))
doFirst {
for (file in pluginJars) {
from(zipTree(file))
}
}
doLast {
delete(pluginJars)
}
}
tasks { tasks {
runIde { runIde {
dependsOn(mergePluginJarTask)
enabled = true enabled = true
} }
prepareSandbox { prepareSandbox {
finalizedBy(mergePluginJarTask)
enabled = true enabled = true
} }
buildSearchableOptions {
dependsOn(mergePluginJarTask)
}
verifyPlugin { verifyPlugin {
dependsOn(mergePluginJarTask)
enabled = true enabled = true
} }
@ -400,8 +360,8 @@ project(":plugin") {
dependencies { dependencies {
intellijPlatform { intellijPlatform {
when (baseIDE) { when (baseIDE) {
"idea" -> intellijIdeaCommunity(ideaVersion) "idea" -> intellijIdeaCommunity(ideaVersion, useInstaller = false)
"clion" -> clion(clionVersion) "clion" -> clion(clionVersion, useInstaller = false)
} }
} }
} }

View file

@ -22,4 +22,4 @@ org.gradle.caching=true
# Enable Gradle Kotlin DSL Lazy Property Assignment -> https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:assignment # Enable Gradle Kotlin DSL Lazy Property Assignment -> https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:assignment
systemProp.org.gradle.unsafe.kotlin.assignment=true systemProp.org.gradle.unsafe.kotlin.assignment=true
org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false org.jetbrains.intellij.platform.useCacheRedirector=false