diff --git a/components/ide/jetbrains/backend-plugin/build.gradle-latest.kts b/components/ide/jetbrains/backend-plugin/build.gradle-latest.kts index 4ea19eea94499a..d99d266718a6fa 100644 --- a/components/ide/jetbrains/backend-plugin/build.gradle-latest.kts +++ b/components/ide/jetbrains/backend-plugin/build.gradle-latest.kts @@ -12,9 +12,9 @@ plugins { // Java support id("java") // Kotlin support - check the latest version at https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm - id("org.jetbrains.kotlin.jvm") version "2.0.0" + id("org.jetbrains.kotlin.jvm") version "2.2.0-RC" // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin - id("org.jetbrains.intellij.platform") version "2.0.0-beta8" + id("org.jetbrains.intellij.platform") version "2.6.0" // id("org.jetbrains.intellij.platform.migration") version "2.0.0-beta7" // detekt linter - read more: https://detekt.github.io/detekt/gradle.html id("io.gitlab.arturbosch.detekt") version "1.23.6" @@ -158,7 +158,9 @@ tasks { targetCompatibility = "21" } withType { - kotlinOptions.jvmTarget = "21" + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21) + } } buildSearchableOptions { @@ -175,8 +177,8 @@ tasks { tasks.register("runPluginVerifier") { if (properties("platformType") == "RD") { - intellijPlatform.verifyPlugin.ides.ide(IntelliJPlatformType.Rider, properties("pluginVerifierIdeVersions")) + intellijPlatform.pluginVerification.ides.ide(IntelliJPlatformType.Rider, properties("pluginVerifierIdeVersions")) } else { - intellijPlatform.verifyPlugin.ides.ide(IntelliJPlatformType.IntellijIdeaUltimate, properties("pluginVerifierIdeVersions")) + intellijPlatform.pluginVerification.ides.ide(IntelliJPlatformType.IntellijIdeaUltimate, properties("pluginVerifierIdeVersions")) } } diff --git a/components/ide/jetbrains/backend-plugin/build.gradle.kts b/components/ide/jetbrains/backend-plugin/build.gradle.kts index 4ea19eea94499a..d99d266718a6fa 100644 --- a/components/ide/jetbrains/backend-plugin/build.gradle.kts +++ b/components/ide/jetbrains/backend-plugin/build.gradle.kts @@ -12,9 +12,9 @@ plugins { // Java support id("java") // Kotlin support - check the latest version at https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm - id("org.jetbrains.kotlin.jvm") version "2.0.0" + id("org.jetbrains.kotlin.jvm") version "2.2.0-RC" // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin - id("org.jetbrains.intellij.platform") version "2.0.0-beta8" + id("org.jetbrains.intellij.platform") version "2.6.0" // id("org.jetbrains.intellij.platform.migration") version "2.0.0-beta7" // detekt linter - read more: https://detekt.github.io/detekt/gradle.html id("io.gitlab.arturbosch.detekt") version "1.23.6" @@ -158,7 +158,9 @@ tasks { targetCompatibility = "21" } withType { - kotlinOptions.jvmTarget = "21" + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21) + } } buildSearchableOptions { @@ -175,8 +177,8 @@ tasks { tasks.register("runPluginVerifier") { if (properties("platformType") == "RD") { - intellijPlatform.verifyPlugin.ides.ide(IntelliJPlatformType.Rider, properties("pluginVerifierIdeVersions")) + intellijPlatform.pluginVerification.ides.ide(IntelliJPlatformType.Rider, properties("pluginVerifierIdeVersions")) } else { - intellijPlatform.verifyPlugin.ides.ide(IntelliJPlatformType.IntellijIdeaUltimate, properties("pluginVerifierIdeVersions")) + intellijPlatform.pluginVerification.ides.ide(IntelliJPlatformType.IntellijIdeaUltimate, properties("pluginVerifierIdeVersions")) } } diff --git a/components/ide/jetbrains/backend-plugin/gradle-latest.properties b/components/ide/jetbrains/backend-plugin/gradle-latest.properties index 32266d1d100e07..b226927c9c0409 100644 --- a/components/ide/jetbrains/backend-plugin/gradle-latest.properties +++ b/components/ide/jetbrains/backend-plugin/gradle-latest.properties @@ -2,10 +2,10 @@ # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. # revert pluginSinceBuild if it's unnecessary -pluginSinceBuild=251.17181 -pluginUntilBuild=251.* +pluginSinceBuild=252.18003 +pluginUntilBuild=252.* # Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl # See https://jb.gg/intellij-platform-builds-list for available build versions. -pluginVerifierIdeVersions=2025.1 +pluginVerifierIdeVersions=2025.2 # Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/updates/updates.xml or exec `./gradlew printProductsReleases` -platformVersion=251.17181.16 +platformVersion=252.18003.27 diff --git a/components/ide/jetbrains/backend-plugin/gradle-stable.properties b/components/ide/jetbrains/backend-plugin/gradle-stable.properties index 2615df6bec1e65..7379bc012de5fb 100644 --- a/components/ide/jetbrains/backend-plugin/gradle-stable.properties +++ b/components/ide/jetbrains/backend-plugin/gradle-stable.properties @@ -8,4 +8,4 @@ pluginUntilBuild=251.* # See https://jb.gg/intellij-platform-builds-list for available build versions. pluginVerifierIdeVersions=2025.1 # Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/intellij-repository/snapshots -platformVersion=251.25410-EAP-CANDIDATE-SNAPSHOT +platformVersion=251.26094.98 diff --git a/components/ide/jetbrains/backend-plugin/src/main/kotlin/kotlinx/coroutines/guava/ListenableFuture.kt b/components/ide/jetbrains/backend-plugin/src/main/kotlin/kotlinx/coroutines/guava/ListenableFuture.kt index 0b200890776969..cbfff1d2b7ac9d 100644 --- a/components/ide/jetbrains/backend-plugin/src/main/kotlin/kotlinx/coroutines/guava/ListenableFuture.kt +++ b/components/ide/jetbrains/backend-plugin/src/main/kotlin/kotlinx/coroutines/guava/ListenableFuture.kt @@ -5,8 +5,7 @@ package kotlinx.coroutines.guava import com.google.common.util.concurrent.* -import com.google.common.util.concurrent.internal.InternalFutureFailureAccess -import com.google.common.util.concurrent.internal.InternalFutures +import com.google.common.util.concurrent.internal.* import kotlinx.coroutines.* import java.util.concurrent.* import java.util.concurrent.CancellationException @@ -138,10 +137,10 @@ public fun ListenableFuture.asDeferred(): Deferred { // Finally, if this isn't done yet, attach a Listener that will complete the Deferred. val deferred = CompletableDeferred() Futures.addCallback(this, object : FutureCallback { - override fun onSuccess(result: T?) { + override fun onSuccess(result: T) { // Here we work with flexible types, so we unchecked cast to trick the type system @Suppress("UNCHECKED_CAST") - runCatching { deferred.complete(result as T) } + runCatching { deferred.complete(result) } .onFailure { handleCoroutineException(EmptyCoroutineContext, it) } } @@ -225,7 +224,7 @@ public fun Deferred.asListenableFuture(): ListenableFuture { * * This suspend function is cancellable. * - * If the [Job] of the current coroutine is cancelled or completed while this suspending function is waiting, this function + * If the [Job] of the current coroutine is cancelled while this suspending function is waiting, this function * stops waiting for the future and immediately resumes with [CancellationException][kotlinx.coroutines.CancellationException]. * * This method is intended to be used with one-shot Futures, so on coroutine cancellation, the Future is cancelled as well. @@ -247,8 +246,7 @@ public suspend fun ListenableFuture.await(): T { return suspendCancellableCoroutine { cont: CancellableContinuation -> addListener( ToContinuation(this, cont), - MoreExecutors.directExecutor() - ) + MoreExecutors.directExecutor()) cont.invokeOnCancellation { cancel(false) } @@ -265,7 +263,7 @@ public suspend fun ListenableFuture.await(): T { private class ToContinuation( val futureToObserve: ListenableFuture, val continuation: CancellableContinuation -) : Runnable { +): Runnable { override fun run() { if (futureToObserve.isCancelled) { continuation.cancel() @@ -346,7 +344,7 @@ private class ListenableFutureCoroutine( * could probably be compressed into one subclass of [AbstractFuture] to save an allocation, at the * cost of the implementation's readability. */ -private class JobListenableFuture(private val jobToCancel: Job) : ListenableFuture { +private class JobListenableFuture(private val jobToCancel: Job): ListenableFuture { /** * Serves as a state machine for [Future] cancellation. * @@ -356,7 +354,7 @@ private class JobListenableFuture(private val jobToCancel: Job) : ListenableF * * To preserve Coroutine's [CancellationException], this future points to either `T` or [Cancelled]. */ - private val auxFuture = SettableFuture.create() + private val auxFuture = SettableFuture.create() /** * `true` if [auxFuture.get][ListenableFuture.get] throws [ExecutionException]. @@ -441,7 +439,7 @@ private class JobListenableFuture(private val jobToCancel: Job) : ListenableF } /** See [get()]. */ - private fun getInternal(result: Any): T = if (result is Cancelled) { + private fun getInternal(result: Any?): T = if (result is Cancelled) { throw CancellationException().initCause(result.exception) } else { // We know that `auxFuture` can contain either `T` or `Cancelled`. diff --git a/components/ide/jetbrains/backend-plugin/src/test/kotlin/io/gitpod/jetbrains/remote/util/LocalHostUriTest.kt b/components/ide/jetbrains/backend-plugin/src/test/kotlin/io/gitpod/jetbrains/remote/util/LocalHostUriTest.kt index c0e91d2da3b555..569d512fbd3c89 100644 --- a/components/ide/jetbrains/backend-plugin/src/test/kotlin/io/gitpod/jetbrains/remote/util/LocalHostUriTest.kt +++ b/components/ide/jetbrains/backend-plugin/src/test/kotlin/io/gitpod/jetbrains/remote/util/LocalHostUriTest.kt @@ -4,12 +4,15 @@ package io.gitpod.jetbrains.remote.util -import com.intellij.testFramework.fixtures.BasePlatformTestCase import io.gitpod.jetbrains.remote.utils.LocalHostUri import io.gitpod.jetbrains.remote.utils.LocalHostUri.LocalHostUriMetadata import java.net.URI +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertTrue -class LocalHostUriTest : BasePlatformTestCase() { +internal class LocalHostUriTest { + @Test fun testExtractLocalHostUriMetaDataForPortMapping() { val urlToMetadataMap = mapOf( "https://localhost:80" to object: LocalHostUriMetadata {