chore: move plugin stuff back into separate subproject
Putting it in the root project breaks the devkit plugin
|
@ -38,9 +38,11 @@ val clionVersion = properties("clionVersion").get()
|
||||||
val clionPlugins = listOf("com.intellij.clion", "com.intellij.cidr.lang", "com.intellij.cidr.base", "com.intellij.nativeDebug")
|
val clionPlugins = listOf("com.intellij.clion", "com.intellij.cidr.lang", "com.intellij.cidr.base", "com.intellij.nativeDebug")
|
||||||
|
|
||||||
val lsp4jVersion = "0.21.1"
|
val lsp4jVersion = "0.21.1"
|
||||||
val lsp4ijVersion = "0.0.2"
|
val lsp4ijVersion = "0.3.0-20240702-174041"
|
||||||
|
|
||||||
val lsp4ijDepString = "${if (lsp4ijVersion.contains("-")) "nightly." else ""}com.jetbrains.plugins:com.redhat.devtools.lsp4ij:$lsp4ijVersion"
|
val lsp4ijNightly = lsp4ijVersion.contains("-")
|
||||||
|
val lsp4ijDepString = "${if (lsp4ijNightly) "nightly." else ""}com.jetbrains.plugins:com.redhat.devtools.lsp4ij:$lsp4ijVersion"
|
||||||
|
val lsp4ijPluginString = "com.redhat.devtools.lsp4ij:$lsp4ijVersion${if (lsp4ijNightly) "@nightly" else ""}"
|
||||||
|
|
||||||
val lsp4ijDep: DependencyHandler.() -> Unit = {
|
val lsp4ijDep: DependencyHandler.() -> Unit = {
|
||||||
intellijPlatformPluginDependency(lsp4ijDepString)
|
intellijPlatformPluginDependency(lsp4ijDepString)
|
||||||
|
@ -138,7 +140,6 @@ allprojects {
|
||||||
dependsOn("generateGrammars")
|
dependsOn("generateGrammars")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configure<JavaPluginExtension> {
|
configure<JavaPluginExtension> {
|
||||||
|
@ -187,6 +188,9 @@ project(":zig") {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":common"))
|
implementation(project(":common"))
|
||||||
lsp4ijDep()
|
lsp4ijDep()
|
||||||
|
intellijPlatform {
|
||||||
|
plugin(lsp4ijPluginString)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tasks {
|
tasks {
|
||||||
generateLexer {
|
generateLexer {
|
||||||
|
@ -246,7 +250,9 @@ project(":zon") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
project(":plugin") {
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":common"))
|
||||||
implementation(project(":zig"))
|
implementation(project(":zig"))
|
||||||
implementation(project(":project"))
|
implementation(project(":project"))
|
||||||
implementation(project(":zon"))
|
implementation(project(":zon"))
|
||||||
|
@ -254,15 +260,11 @@ dependencies {
|
||||||
intellijPlatform {
|
intellijPlatform {
|
||||||
zipSigner()
|
zipSigner()
|
||||||
pluginVerifier()
|
pluginVerifier()
|
||||||
when (baseIDE) {
|
plugin(lsp4ijPluginString)
|
||||||
"idea" -> intellijIdeaCommunity(ideaVersion)
|
|
||||||
"clion" -> clion(clionVersion)
|
|
||||||
}
|
}
|
||||||
plugin("com.redhat.devtools.lsp4ij:$lsp4ijVersion")
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
intellijPlatform {
|
intellijPlatform {
|
||||||
pluginConfiguration {
|
pluginConfiguration {
|
||||||
name = properties("pluginName")
|
name = properties("pluginName")
|
||||||
description = providers.fileContents(rootProject.layout.projectDirectory.file("README.md")).asText.map {
|
description = providers.fileContents(rootProject.layout.projectDirectory.file("README.md")).asText.map {
|
||||||
|
@ -300,13 +302,13 @@ intellijPlatform {
|
||||||
ide(IntelliJPlatformType.CLion, clionVersion)
|
ide(IntelliJPlatformType.CLion, clionVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include the generated files in the source set
|
// Include the generated files in the source set
|
||||||
|
|
||||||
// Collects all jars produced by compilation of project modules and merges them into singe one.
|
// 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
|
// We need to put all plugin manifest files into single jar to make new plugin model work
|
||||||
val mergePluginJarTask = task<Jar>("mergePluginJars") {
|
val mergePluginJarTask = task<Jar>("mergePluginJars") {
|
||||||
duplicatesStrategy = DuplicatesStrategy.FAIL
|
duplicatesStrategy = DuplicatesStrategy.FAIL
|
||||||
archiveBaseName.set("ZigBrains")
|
archiveBaseName.set("ZigBrains")
|
||||||
|
|
||||||
|
@ -333,9 +335,9 @@ val mergePluginJarTask = task<Jar>("mergePluginJars") {
|
||||||
doLast {
|
doLast {
|
||||||
delete(pluginJars)
|
delete(pluginJars)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
runIde {
|
runIde {
|
||||||
dependsOn(mergePluginJarTask)
|
dependsOn(mergePluginJarTask)
|
||||||
enabled = true
|
enabled = true
|
||||||
|
@ -370,16 +372,27 @@ tasks {
|
||||||
buildPlugin {
|
buildPlugin {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
generateLexer {
|
generateLexer {
|
||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
generateParser {
|
generateParser {
|
||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
intellijPlatform {
|
||||||
|
when (baseIDE) {
|
||||||
|
"idea" -> intellijIdeaCommunity(ideaVersion)
|
||||||
|
"clion" -> clion(clionVersion)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun distFile(it: String) = layout.buildDirectory.file("dist/ZigBrains-${pluginVersion().get()}-$it-signed.zip")
|
fun distFile(it: String) = layout.buildDirectory.file("dist/ZigBrains-${pluginVersion().get()}-$it-signed.zip")
|
||||||
|
|
||||||
publishVersions.forEach {
|
publishVersions.forEach {
|
||||||
|
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 858 B After Width: | Height: | Size: 858 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |