forked from OpenLiberty/liberty-tools-intellij
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
330 lines (306 loc) · 20 KB
/
build.gradle
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
plugins {
id 'java'
id 'org.jetbrains.intellij' version '1.17.3'
id 'org.jetbrains.kotlin.jvm' version '1.7.22'
}
group 'io.openliberty.tools'
version '24.0.9'
sourceCompatibility = 17
targetCompatibility = 17
def remoteRobotVersion = "0.11.18"
// To switch to nightly version, append "@nightly" to the version number (i.e. 0.4.1-20240828-013108@nightly)
def lsp4ijVersion = '0.5.0'
repositories {
mavenCentral()
maven {
url 'https://repo.eclipse.org/content/repositories/snapshots'
}
maven {
url 'https://repo.eclipse.org/content/repositories/releases'
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url = "https://packages.jetbrains.team/maven/p/ij/intellij-dependencies"
}
maven {
url = "https://www.jetbrains.com/intellij-repository/releases"
}
maven {
url = "https://packages.jetbrains.team/maven/p/kpm/public"
}
maven {
url = "https://cache-redirector.jetbrains.com/packages.jetbrains.team/maven/p/grazi/grazie-platform-public"
}
maven {
url = "https://download.jetbrains.com/teamcity-repository"
}
maven {
url = "https://cache-redirector.jetbrains.com/download-pgp-verifier"
}
mavenLocal() // TODO remove once Liberty LS is publicly available
}
configurations {
lsp
// needed to avoid ClassCastException org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to class javax.xml.parsers.DocumentBuilderFactory
// xml-apis interfering with Xerces
all*.exclude group: 'xml-apis'
runtimeClasspath {
exclude group: 'org.slf4j', module: 'slf4j-api'
}
// Ensures that the JVM target is set to 17 for all Kotlin compilation tasks, including both main and test sources.
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "17"
}
}
}
dependencies {
implementation ('org.eclipse.lsp4mp:org.eclipse.lsp4mp.ls:0.12.0') {
exclude group: 'org.eclipse.lsp4j'
exclude group: 'com.google.code.gson'
}
implementation ('org.eclipse.lemminx:org.eclipse.lemminx:0.26.1') {
exclude group: 'org.eclipse.lsp4j'
exclude group: 'com.google.code.gson'
}
implementation 'io.openliberty.tools:liberty-langserver-lemminx:2.1.2'
implementation ('io.openliberty.tools:liberty-langserver:2.1.2') {
exclude group: 'org.eclipse.lsp4j'
exclude group: 'com.google.code.gson'
}
implementation ('org.eclipse.lsp4jakarta:org.eclipse.lsp4jakarta.ls:0.2.0') {
exclude group: 'org.eclipse.lsp4mp'
exclude group: 'org.eclipse.lsp4j'
exclude group: 'com.google.code.gson'
}
implementation 'org.apache.maven:maven-artifact:3.6.3'
// implementation 'com.vladsch.flexmark:flexmark:0.64.8'
// implementation 'org.jsoup:jsoup:1.15.3'
//Add junit dependency back when tests are added
//testImplementation group: 'junit', name: 'junit', version: '4.13.1'
//required by lsp4j as the version from IJ is incompatible
testImplementation 'com.google.code.gson:gson:2.8.9'
// Test: basics.
testImplementation 'com.intellij.remoterobot:remote-robot:' + remoteRobotVersion
testImplementation 'com.intellij.remoterobot:remote-fixtures:' + remoteRobotVersion
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testImplementation('com.jetbrains.intellij.maven:maven-test-framework:241.15989.150') {
transitive = false
}
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.9.2'
// JUnit 4
testImplementation 'org.junit.platform:junit-platform-launcher:1.9.3'
testImplementation 'org.junit.vintage:junit-vintage-engine:5.9.3'
// Test: Video Recording.
testImplementation 'com.automation-remarks:video-recorder-junit5:2.0'
// define jars to grab locally (if falling back to mavenLocal() repo)
lsp('org.eclipse.lsp4mp:org.eclipse.lsp4mp.ls:0.12.0:uber') {
transitive = false
}
lsp('org.eclipse.lemminx:org.eclipse.lemminx:0.26.1:uber') {
transitive = false
}
lsp('io.openliberty.tools:liberty-langserver-lemminx:2.1.2:jar-with-dependencies') {
transitive = false
}
lsp('io.openliberty.tools:liberty-langserver:2.1.2:jar-with-dependencies') {
transitive = false
}
lsp('org.eclipse.lsp4jakarta:org.eclipse.lsp4jakarta.ls:0.2.0:jar-with-dependencies') {
transitive = false
}
implementation files(new File(buildDir, 'server')) {
builtBy 'copyDeps'
}
}
task copyDeps(type: Copy) {
from configurations.lsp
into new File(buildDir, 'server/server')
rename '^(.*)(-[0-9]+[.[0-9]+]+(-SNAPSHOT)?)(.*)$', '$1$4'
}
runIde {
jvmArgs '--add-exports', 'java.base/jdk.internal.vm=ALL-UNNAMED'
}
intellij {
// For a full list of IntelliJ IDEA releases please see https://www.jetbrains.com/intellij-repository/releases
version = '2024.1.6'
def lsp4ij = project.hasProperty('useLocal') && project.property('useLocal') == 'true' ?
file("../lsp4ij/build/distributions/LSP4IJ/") :
'com.redhat.devtools.lsp4ij:' + lsp4ijVersion
plugins = ['java', 'maven', 'gradle-java', 'properties', 'terminal', 'org.jetbrains.idea.maven', 'com.intellij.gradle', lsp4ij]
updateSinceUntilBuild = false
}
downloadRobotServerPlugin {
version.set(remoteRobotVersion)
}
runIdeForUiTests {
systemProperty "robot-server.port", "8082"
systemProperty "ide.mac.message.dialogs.as.sheets", "false"
systemProperty "jb.privacy.policy.text", "<!--999.999-->"
systemProperty "jb.consents.confirmation.enabled", "false"
systemProperty "idea.trust.all.projects", "true"
systemProperty "ide.show.tips.on.startup.default.value", "false"
systemProperty "ide.mac.file.chooser.native", "false"
systemProperty "jbScreenMenuBar.enabled", "false"
systemProperty "apple.laf.useScreenMenuBar", "false"
}
test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
}
tasks {
// Disabling buildSearchableOptions, which runs as part of the buildPlugin task.
// this is to buildSearchableOptions to workaround the "Only one instance of IDEA can be run at a time" problem.
// Per documentation: https://plugins.jetbrains.com/docs/intellij/ide-development-instance.html#the-development-instance-sandbox-directory
buildSearchableOptions {
enabled = false
}
}
patchPluginXml {
changeNotes = """
<h2> 24.0.9 </h2>
<p>Version 24.0.9 of Liberty Tools for IntelliJ IDEA contains enhancements and fixes. Version 24.0.9 requires IntelliJ IDEA version 2024.1.* ONLY and a minimum of Java 17.</p>
Notable changes:
<ul>
<li> Liberty Tools has now adopted the Red Hat LSP4IJ plugin as a dependency to provide the core framework for each of the LSP clients. It is available in the <a href="https://plugins.jetbrains.com/plugin/23257-lsp4ij">JetBrains Marketplace</a>.
<li> Updates to use newer versions of IntelliJ APIs and remove usage of deprecated APIs.
<li> Fix for LSP4Jakarta quick fix key names being displayed instead of the quick fix descriptions.
<li> Fix for Liberty Start action failing when there is a space in the project directory.
<li> Fix to find test reports in the new default location that the Maven Surefire Report Plugin creates reports in as of version 3.5.0. Liberty Tools will also find test reports in the old default location.
<li> Fix via LSP4IJ 0.5.0 to allow for case-insensitive filtering while using completion in server.env and bootstrap.properties.
<li> Resolved multiple language client issues that were present in previous Liberty Tools releases by adopting the Red Hat LSP4IJ plugin.
<li> Updated the LSP4Jakarta client to prepare it for adoption of a future LSP4Jakarta release that will provide support for just-in-time resolution of code actions.
<li> Updated <a href="https://github.com/eclipse/lsp4mp">Language Server for MicroProfile</a> version to 0.12.0. Refer to the following release tag:
<ul>
<li>https://github.com/eclipse/lsp4mp/releases/tag/0.12.0
</ul>
</ul>
<p>Note: You may observe slow performance when editing your server.xml file when invoking completion or hover. It is possible you may receive a "No documentation found" message on hover. If observed, please report your experience on this GitHub issue: https://github.com/OpenLiberty/liberty-tools-intellij/issues/687.</p>
See the <a href="https://github.com/OpenLiberty/liberty-tools-intellij/compare/24.0.6...24.0.9">commit log</a> for the full set of changes since the previous release.
<br>
<h2> 24.0.6 </h2>
<p>Version 24.0.6 of Liberty Tools for IntelliJ IDEA contains enhancements and fixes. Version 24.0.6 requires IntelliJ IDEA version 2023.2.*, 2023.3.*, or 2024.1.* and a minimum of Java 17.</p>
Notable changes:
<ul>
<li> Added support for IntelliJ IDEA 2024.1 and its successive fix releases.
<li> Complete quick fix support for Jakarta EE Web Profile 9.x APIs when editing Java files via the <a href="https://github.com/eclipse/lsp4jakarta">Eclipse LSP4Jakarta</a>, Language Server for Jakarta EE.
<li> Enabled GraphQL API support via the <a href="https://github.com/eclipse/lsp4mp">Eclipse LSP4MP</a>, Language Server for MicroProfile.
<li> Fix to bring into focus the terminal tab running the Liberty project targeted by a Liberty action.
<li> Fix to enable the removal of custom start parameters from the “Liberty: Start” action when a Liberty Run/Debug configuration is deleted.
<li> Updated the helper text and hover text for the “Start parameters” input box in the Liberty Run/Debug configuration editor.
<li> Renamed the “Liberty: View effective POM” action to “Liberty: View pom.xml”.
<p>Note: You may observe slow performance when editing your server.xml file when invoking completion or hover. It is possible you may receive a "No documentation found" message on hover. If observed, please report your experience on this GitHub issue: https://github.com/OpenLiberty/liberty-tools-intellij/issues/687.</p>
See the <a href="https://github.com/OpenLiberty/liberty-tools-intellij/compare/24.0.3...24.0.6">commit log</a> for the full set of changes since the previous release.
<br>
<h2> 24.0.3 </h2>
<p>Version 24.0.3 of Liberty Tools for IntelliJ IDEA contains enhancements and fixes. Version 24.0.3 requires IntelliJ IDEA version 2023.2.* or 2023.3.* and a minimum of Java 17.</p>
Notable changes:
<ul>
<li> Added support for IntelliJ IDEA 2023.3 and its successive fix releases.
<li> Completion support for MicroProfile APIs in Java files, provided by the <a href="https://github.com/eclipse/lsp4mp">Language Server for MicroProfile</a>.
<li> When the contents of the Liberty tool window are too large to fit in its window, a scroll bar appears.
<li> Helpful advice is displayed when no project appears in the Liberty tool window.
<li> Added the Language Servers tool window, which you can use when you need technical support.
<li> Updated the <a href="https://github.com/OpenLiberty/liberty-language-server">Liberty Config Language Server</a> version to 2.1.2. For more information about the changes for version 2.1.2, refer to the following release notes:
<ul>
<li> https://github.com/OpenLiberty/liberty-language-server/releases/tag/liberty-langserver-2.1.2
<li> https://github.com/OpenLiberty/liberty-language-server/releases/tag/lemminx-liberty-2.1.2
</ul>
<li> Updated the <a href="https://github.com/eclipse/lsp4jakarta">Language Server for Jakarta EE</a> version to 0.2.0. For more information about changes for version 0.2.0, refer to the following release notes:
<ul>
<li>https://github.com/eclipse/lsp4jakarta/releases/tag/0.2.0
</ul>
<li> Updated <a href="https://github.com/eclipse/lsp4mp">Language Server for MicroProfile</a> version to 0.10.0. Refer to the following release tag:
<ul>
<li>https://github.com/eclipse/lsp4mp/releases/tag/0.10.0
</ul>
</ul>
<p>Note: You may observe slow performance when editing your server.xml file when invoking completion or hover. It is possible you may receive a "No documentation found" message on hover. If observed, please report your experience on this GitHub issue: https://github.com/OpenLiberty/liberty-tools-intellij/issues/687.</p>
See the <a href="https://github.com/OpenLiberty/liberty-tools-intellij/compare/23.0.12...24.0.3">commit log</a> for the full set of changes since the previous release.
<br>
<h2> 23.0.12 </h2>
<p>Version 23.0.12 of Liberty Tools for IntelliJ IDEA contains enhancements and fixes. Version 23.0.12 requires IntelliJ IDEA version 2023.1.* or 2023.2.* and a minimum of Java 17.</p>
Notable changes:
<ul>
<li> Partial quick fix support for Jakarta EE Web Profile 9.x APIs when editing Java files via the <a href="https://github.com/eclipse/lsp4jakarta">Eclipse LSP4Jakarta</a>, Language Server for Jakarta EE
<li> Updated <a href="https://github.com/OpenLiberty/liberty-language-server">Liberty Config Language Server</a> version to 2.1.1. For information regarding changes for version 2.1, refer to the release notes linked below:
<ul>
<li> https://github.com/OpenLiberty/liberty-language-server/releases/tag/liberty-langserver-2.1
<li> https://github.com/OpenLiberty/liberty-language-server/releases/tag/lemminx-liberty-2.1
</ul>
<li> Fix for erroneous detection of projects in the Liberty tool window when the Liberty Gradle Plugin is commented out in the build.gradle file - https://github.com/OpenLiberty/liberty-tools-intellij/issues/445
<li> Fix for incorrect project name being displayed in the “Remove Liberty project” confirmation dialog - https://github.com/OpenLiberty/liberty-tools-intellij/issues/321
<li> Fix to link to the Liberty Tools for IntelliJ GitHub issues page when an error in the Liberty Tools plugin is reported by the IntelliJ IDE - https://github.com/OpenLiberty/liberty-tools-intellij/issues/468
<li> Fix to surface error to user when Java 17 or later is not found when attempting to start up language servers - https://github.com/OpenLiberty/liberty-tools-intellij/issues/196
<li> Enhancement to enable custom Liberty configuration support provided by the Liberty Config Language Server - https://github.com/OpenLiberty/liberty-tools-intellij/issues/490
<li> Enhancement to add a “Run in container” checkbox to the Liberty run/debug configuration - https://github.com/OpenLiberty/liberty-tools-intellij/issues/160
<li> Enhancement to support IntelliJ IDEA version 2023.2.x - https://github.com/OpenLiberty/liberty-tools-intellij/issues/487
<li> Fix for ClassCastException from Liberty tool window project tree - https://github.com/OpenLiberty/liberty-tools-intellij/issues/561
<li> Fix for NullPointerException when the Maven executable is not able to execute - https://github.com/OpenLiberty/liberty-tools-intellij/issues/566
<li> Fix for Liberty start actions not working when the Maven build settings are set to use a Maven wrapper and multiple Maven projects are loaded in the IntelliJ workspace - https://github.com/OpenLiberty/liberty-tools-intellij/issues/563
<li> Fix for Liberty start actions not working when multiple Gradle projects are loaded in the IntelliJ workspace - https://github.com/OpenLiberty/liberty-tools-intellij/issues/568
</ul>
<p>See the <a href="https://github.com/OpenLiberty/liberty-tools-intellij/compare/23.0.6...23.0.12">commit log</a> for the full set of changes since the previous release.</p>
<h2> 23.0.6 </h2>
<p>Version 23.0.6 of Liberty Tools for IntelliJ IDEA contains new functionality and fixes. Version 23.0.6 requires IntelliJ IDEA version 2023.1.* and a minimum of Java 17.</p>
Notable changes:
<ul>
<li> Diagnostic and hover support when editing server.xml, server.env, bootstrap.properties via the <a href="https://github.com/OpenLiberty/liberty-language-server">Liberty Config Language Server</a>
<li> Quick fix support when editing server.xml via the <a href="https://github.com/OpenLiberty/liberty-language-server">Liberty Config Language Server</a>
<li> Diagnostic and hover support for Jakarta EE Web Profile 9.x APIs when editing Java files via the <a href="https://github.com/eclipse/lsp4jakarta">Eclipse LSP4Jakarta</a>, Language Server for Jakarta EE
<li> Diagnostic, hover and quick fix support for MicroProfile APIs when editing Java and microprofile-config.properties files via the <a href="https://github.com/eclipse/lsp4mp">Eclipse LSP4MP</a>, Language Server for MicroProfile
<li> Bug fixes to clean up exceptions and improve overall quality of loading projects in the Liberty tool window and running Liberty actions through the Liberty tool window and Search Everywhere window
</ul>
<p>See the <a href="https://github.com/OpenLiberty/liberty-tools-intellij/compare/0.0.8...23.0.6">commit log</a> for the full set of changes since the previous release.</p>
<h2> 0.0.8 </h2>
<p>Version 0.0.8 of Liberty Tools for IntelliJ IDEA is an <b>early release</b> that contains new functionality and fixes. Liberty Tools for IntelliJ IDEA now requires IntelliJ IDEA version 2022.2+ and Java 17+.</p>
Notable enhancements:
<ul>
<li> Completion support when editing server.xml, server.env, bootstrap.properties via the <a href="https://github.com/OpenLiberty/liberty-language-server">Liberty Config Language Server</a>.
<li> Completion support for Jakarta EE Web Profile 9.x APIs when editing Java files via the <a href="https://github.com/eclipse/lsp4jakarta">Eclipse LSP4Jakarta</a>, Language Server for Jakarta EE.
<li> Completion support for MicroProfile 3 & 4 APIs when editing Java and microprofile-config.properties files via the <a href="https://github.com/eclipse/lsp4mp">Eclipse LSP4MP</a>, Language Server for MicroProfile.
<li> Liberty projects are now automatically detected via the presence of a “src/main/liberty/config/server.xml” file.
<li> New Liberty Run/Debug Configuration, accessible through the “Liberty: Start…” action or the IntelliJ Run/Debug Configuration menu. When “Debug” is selected, the Liberty runtime will start and the IntelliJ debugger will automatically attach to the JVM for the running Liberty instance.
<li> Ability to run Liberty actions through the IntelliJ “Search Everywhere” window.
<li> Ability to manually add Liberty projects to the Liberty tool window.
<li> Liberty start actions will honour the Maven home path and Gradle JVM set in IntelliJ IDEA preferences.
<li> New icons for Maven and Gradle projects in the Liberty tool window.
</ul>
<p>See the <a href="https://github.com/OpenLiberty/liberty-tools-intellij/compare/0.0.7...0.0.8">commit log</a> for the full set of changes since the previous early release.</p>
<h2> 0.0.7 </h2>
<ul>
<li> Rename plugin to Liberty Tools for IntelliJ
</ul>
<h2> 0.0.6 </h2>
<ul>
<li> Fix release
</ul>
<h2> 0.0.5 </h2>
<ul>
<li> Update action wording and documentation
</ul>
<h2> 0.0.4 </h2>
<ul>
<li> Removed tech preview wording from "start in container" action
</ul>
<h2> 0.0.3 </h2>
<ul>
<li> Updated plugin description
</ul>
<h2> 0.0.2 </h2>
<ul>
<li> Added start in container (tech preview) action
</ul>
<h2> 0.0.1 </h2>
<ul>
<li> First preview release
</ul>
"""
version project.version
}