-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle.kts
105 lines (88 loc) · 3.04 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import org.jetbrains.intellij.tasks.PatchPluginXmlTask
import org.jetbrains.intellij.tasks.PrepareSandboxTask
import org.jetbrains.intellij.tasks.RunIdeTask
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.io.ByteArrayOutputStream
plugins {
id("org.jetbrains.intellij") version "1.9.0"
kotlin("jvm") version "1.7.10"
id("net.researchgate.release") version "2.8.1"
}
group = "org.gap.ijplugins.spring.ideaspringtools"
if(version.toString().endsWith("SNAPSHOT")) {
version = version.toString().replace("SNAPSHOT", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd.HH.mm.ss.SSS")))
}
repositories {
mavenCentral()
maven ("https://jitpack.io")
maven ("https://repo.spring.io/artifactory/libs-snapshot-local/")
}
val languageServer by configurations.creating
dependencies {
implementation(kotlin("stdlib-jdk8"))
//implementation("com.github.ballerina-platform:lsp4intellij:0.94.2")
implementation(project(":lsp4intellij"))
implementation("org.springframework.ide.vscode:commons-java:1.22.0-SNAPSHOT")
languageServer("org.springframework.ide.vscode:spring-boot-language-server:1.22.0-SNAPSHOT:exec") {
isTransitive = false
}
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version.set("223-EAP-SNAPSHOT")
type.set("IC")
pluginName.set("idea-spring-tools")
plugins.set(listOf("java"))
updateSinceUntilBuild.set(true)
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
tasks.getByName<PatchPluginXmlTask>("patchPluginXml") {
untilBuild.set("243.*")
sinceBuild.set("221.*")
}
tasks.getByName<PrepareSandboxTask>("prepareSandbox").doLast {
val pluginServerDir = "${intellij.sandboxDir.get()}/plugins/${intellij.pluginName.get()}/lib/server"
mkdir(pluginServerDir)
copy {
from(languageServer)
into(pluginServerDir)
rename("spring-boot-language-server.*\\.jar", "language-server.jar")
}
}
tasks {
buildPlugin {
doLast() {
val content = """
<?xml version="1.0" encoding="UTF-8"?>
<plugins>
<plugin id="org.gap.ijplugins.spring.idea-spring-tools" url="https://dl.bintray.com/gayanper/idea-spring-tools/${intellij.pluginName}-${version}.zip"
version="${version}">
<idea-version since-build="222.*" until-build="243.*" />
</plugin>
</plugins>
""".trimIndent()
file("build/distributions/updatePlugins.xml").writeText(content)
}
}
publishPlugin {
token.set(System.getenv("JB_API_KEY"))
}
runIde {
setJvmArgs(listOf("-Dsts4.jvmargs=-Xmx512m -Xms512m"))
jbrVersion.set("17.0.3b469.37")
}
}
release {
failOnUnversionedFiles = false
failOnSnapshotDependencies = false
tagTemplate = "$version"
buildTasks = arrayListOf("buildPlugin")
}