Skip to content

Commit

Permalink
chore(intellij): correct junit version
Browse files Browse the repository at this point in the history
  • Loading branch information
d-biehl committed Jan 12, 2025
1 parent 121b26e commit c730eb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 39 deletions.
45 changes: 7 additions & 38 deletions intellij-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ import org.jetbrains.intellij.platform.gradle.Constants.Constraints
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import org.jetbrains.intellij.platform.gradle.tasks.PrepareSandboxTask
import java.net.URI
import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.time.Duration
import java.time.temporal.ChronoUnit
import java.util.regex.Pattern

plugins {
alias(libs.plugins.kotlin)
Expand Down Expand Up @@ -53,7 +46,7 @@ dependencies {
create(
providers.gradleProperty("platformType"),
providers.gradleProperty("platformVersion"),
useInstaller = false
useInstaller = false,
)

// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
Expand Down Expand Up @@ -85,14 +78,13 @@ intellijPlatform {
}
}

val changelog = project.changelog // local variable for configuration cache compatibility
// Get the latest available change notes from the changelog file
val changelog = project.changelog

// local variable for configuration cache compatibility // Get the latest available change notes from the changelog file
changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())
.withHeader(false)
.withEmptySections(false),
(getOrNull(pluginVersion) ?: getUnreleased()).withHeader(false).withEmptySections(false),
Changelog.OutputType.HTML,
)
}
Expand All @@ -112,6 +104,7 @@ intellijPlatform {

publishing {
token = providers.environmentVariable("PUBLISH_TOKEN")

// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
Expand Down Expand Up @@ -156,6 +149,7 @@ val prepareSandboxConfig: PrepareSandboxTask.() -> Unit = {

tasks {
runIde {

// From https://app.slack.com/client/T5P9YATH9/C5U8BM1MK
// systemProperty("ide.experimental.ui", "true")
// systemProperty("projectView.hide.dot.idea", "false")
Expand All @@ -175,7 +169,6 @@ tasks {
}



// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
val runIdeForUiTests by intellijPlatformTesting.runIde.registering {
Expand Down Expand Up @@ -208,27 +201,3 @@ val runIdeIntellijIdeaC by intellijPlatformTesting.runIde.registering {

prepareSandboxTask(prepareSandboxConfig)
}

fun fetchLatestLsp4ijNightlyVersion(): String {
val client = HttpClient.newBuilder().build();
var onlineVersion = ""
try {
val request: HttpRequest = HttpRequest.newBuilder()
.uri(URI("https://plugins.jetbrains.com/api/plugins/23257/updates?channel=nightly&size=1"))
.GET()
.timeout(Duration.of(10, ChronoUnit.SECONDS))
.build()
val response = client.send(request, HttpResponse.BodyHandlers.ofString());
val pattern = Pattern.compile("\"version\":\"([^\"]+)\"")
val matcher = pattern.matcher(response.body())
if (matcher.find()) {
onlineVersion = matcher.group(1)
println("Latest approved nightly build: $onlineVersion")
}
} catch (e: Exception) {
println("Failed to fetch LSP4IJ nightly build version: ${e.message}")
}

val minVersion = "0.0.1-20231213-012910"
return if (minVersion < onlineVersion) onlineVersion else minVersion
}
2 changes: 1 addition & 1 deletion intellij-client/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# libraries
annotations = "26.0.1"
kotlinxSerialization = "1.8.0"
junit = "5.11.4"
junit = "4.13.2"
lsp4j = "0.21.1"

# plugins
Expand Down

0 comments on commit c730eb3

Please sign in to comment.