@@ -4,13 +4,6 @@ import org.jetbrains.intellij.platform.gradle.Constants.Constraints
4
4
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
5
5
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
6
6
import org.jetbrains.intellij.platform.gradle.tasks.PrepareSandboxTask
7
- import java.net.URI
8
- import java.net.http.HttpClient
9
- import java.net.http.HttpRequest
10
- import java.net.http.HttpResponse
11
- import java.time.Duration
12
- import java.time.temporal.ChronoUnit
13
- import java.util.regex.Pattern
14
7
15
8
plugins {
16
9
alias(libs.plugins.kotlin)
@@ -53,7 +46,7 @@ dependencies {
53
46
create(
54
47
providers.gradleProperty(" platformType" ),
55
48
providers.gradleProperty(" platformVersion" ),
56
- useInstaller = false
49
+ useInstaller = false ,
57
50
)
58
51
59
52
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
@@ -85,14 +78,13 @@ intellijPlatform {
85
78
}
86
79
}
87
80
88
- val changelog = project.changelog // local variable for configuration cache compatibility
89
- // Get the latest available change notes from the changelog file
81
+ val changelog = project.changelog
82
+
83
+ // local variable for configuration cache compatibility // Get the latest available change notes from the changelog file
90
84
changeNotes = providers.gradleProperty(" pluginVersion" ).map { pluginVersion ->
91
85
with (changelog) {
92
86
renderItem(
93
- (getOrNull(pluginVersion) ? : getUnreleased())
94
- .withHeader(false )
95
- .withEmptySections(false ),
87
+ (getOrNull(pluginVersion) ? : getUnreleased()).withHeader(false ).withEmptySections(false ),
96
88
Changelog .OutputType .HTML ,
97
89
)
98
90
}
@@ -112,6 +104,7 @@ intellijPlatform {
112
104
113
105
publishing {
114
106
token = providers.environmentVariable(" PUBLISH_TOKEN" )
107
+
115
108
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
116
109
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
117
110
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
@@ -156,6 +149,7 @@ val prepareSandboxConfig: PrepareSandboxTask.() -> Unit = {
156
149
157
150
tasks {
158
151
runIde {
152
+
159
153
// From https://app.slack.com/client/T5P9YATH9/C5U8BM1MK
160
154
// systemProperty("ide.experimental.ui", "true")
161
155
// systemProperty("projectView.hide.dot.idea", "false")
@@ -175,7 +169,6 @@ tasks {
175
169
}
176
170
177
171
178
-
179
172
// Configure UI tests plugin
180
173
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
181
174
val runIdeForUiTests by intellijPlatformTesting.runIde.registering {
@@ -208,27 +201,3 @@ val runIdeIntellijIdeaC by intellijPlatformTesting.runIde.registering {
208
201
209
202
prepareSandboxTask(prepareSandboxConfig)
210
203
}
211
-
212
- fun fetchLatestLsp4ijNightlyVersion (): String {
213
- val client = HttpClient .newBuilder().build();
214
- var onlineVersion = " "
215
- try {
216
- val request: HttpRequest = HttpRequest .newBuilder()
217
- .uri(URI (" https://plugins.jetbrains.com/api/plugins/23257/updates?channel=nightly&size=1" ))
218
- .GET ()
219
- .timeout(Duration .of(10 , ChronoUnit .SECONDS ))
220
- .build()
221
- val response = client.send(request, HttpResponse .BodyHandlers .ofString());
222
- val pattern = Pattern .compile(" \" version\" :\" ([^\" ]+)\" " )
223
- val matcher = pattern.matcher(response.body())
224
- if (matcher.find()) {
225
- onlineVersion = matcher.group(1 )
226
- println (" Latest approved nightly build: $onlineVersion " )
227
- }
228
- } catch (e: Exception ) {
229
- println (" Failed to fetch LSP4IJ nightly build version: ${e.message} " )
230
- }
231
-
232
- val minVersion = " 0.0.1-20231213-012910"
233
- return if (minVersion < onlineVersion) onlineVersion else minVersion
234
- }
0 commit comments