From bdfa6092d3f59eab3485399d43f8f8b955933c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Tue, 14 Oct 2025 17:41:54 -0700 Subject: [PATCH] Upgrade Gradle Wrapper to 9.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bernát Gábor --- .pre-commit-config.yaml | 4 ++-- build.gradle.kts | 21 +++++++++---------- gradle/libs.versions.toml | 18 +++++++++------- gradle/wrapper/gradle-wrapper.properties | 2 +- .../actions/ConfigurePythonActionAbstract.kt | 9 ++++++-- 5 files changed, 30 insertions(+), 24 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 47b095c..24acc3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,5 +14,5 @@ repos: hooks: - id: prettier additional_dependencies: - - prettier@3.3.3 - - "@prettier/plugin-xml@3.4.1" + - prettier@3.6.2 + - "@prettier/plugin-xml@3.4.2" diff --git a/build.gradle.kts b/build.gradle.kts index 7eb34a7..da15af0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,16 +30,15 @@ repositories { } dependencies { - testImplementation("com.squareup.okhttp3:okhttp:4.12.0") // needed for connecting to remote robot testImplementation(libs.jupiter) testRuntimeOnly(libs.jupiterEngine) - testRuntimeOnly("junit:junit:4.13.2") // https://github.com/JetBrains/intellij-platform-gradle-plugin/issues/1711 + testRuntimeOnly(libs.junitPlatformLauncher) + testRuntimeOnly("junit:junit:4.13.2") // legacy JUnit 4 support testImplementation(libs.remoteRobot) testImplementation(libs.remoteRobotFixtures) intellijPlatform { pycharmCommunity(platformVersion) bundledPlugin("PythonCore") - instrumentationTools() pluginVerifier() zipSigner() testFramework(TestFrameworkType.JUnit5) @@ -101,13 +100,13 @@ intellijPlatform { pluginVerification { ides { // target supporting the following platforms - ide(IntelliJPlatformType.PyCharmCommunity, platformVersion) - ide(IntelliJPlatformType.PyCharmProfessional, platformVersion) - ide(IntelliJPlatformType.IntellijIdeaCommunity, platformVersion) - ide(IntelliJPlatformType.IntellijIdeaUltimate, platformVersion) - ide(IntelliJPlatformType.GoLand, platformVersion) - ide(IntelliJPlatformType.CLion, platformVersion) - ide(IntelliJPlatformType.RustRover, platformVersion) + create(IntelliJPlatformType.PyCharmCommunity, platformVersion) + create(IntelliJPlatformType.PyCharmProfessional, platformVersion) + create(IntelliJPlatformType.IntellijIdeaCommunity, platformVersion) + create(IntelliJPlatformType.IntellijIdeaUltimate, platformVersion) + create(IntelliJPlatformType.GoLand, platformVersion) + create(IntelliJPlatformType.CLion, platformVersion) + create(IntelliJPlatformType.RustRover, platformVersion) } } } @@ -164,6 +163,6 @@ val runIdeForUiTests by intellijPlatformTesting.runIde.registering { versionCatalogUpdate { keep { - keepUnusedPlugins.set(true) // taskinfo is unused but that is fine + keepUnusedVersions = true } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7dc0462..f705777 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,21 +1,23 @@ [versions] -changelog = "2.2.1" -intelliJPlatform = "2.0.1" -jupiter = "5.10.3" -kotlin = "2.0.10" -kover = "0.8.3" -ktlint = "12.1.1" +changelog = "2.4.0" +intelliJPlatform = "2.10.0" +junitPlatformLauncher= "1.14.0" +jupiter = "5.14.0" +kotlin = "2.2.20" +kover = "0.9.2" +ktlint = "13.1.0" remoteRobot = "0.11.23" taskinfo = "2.2.0" testLogger = "4.0.0" -versionPlugin = "0.51.0" -versionUpdate = "0.8.4" +versionPlugin = "0.53.0" +versionUpdate = "1.0.1" [libraries] jupiter = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "jupiter" } jupiterEngine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "jupiter" } remoteRobot = { module = "com.intellij.remoterobot:remote-robot", version.ref = "remoteRobot" } remoteRobotFixtures = { module = "com.intellij.remoterobot:remote-fixtures", version.ref = "remoteRobot" } +junitPlatformLauncher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junitPlatformLauncher" } [plugins] changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index dedd5d1..2e11132 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/kotlin/com/github/pyvenvmanage/actions/ConfigurePythonActionAbstract.kt b/src/main/kotlin/com/github/pyvenvmanage/actions/ConfigurePythonActionAbstract.kt index f7d98f6..52cc75d 100644 --- a/src/main/kotlin/com/github/pyvenvmanage/actions/ConfigurePythonActionAbstract.kt +++ b/src/main/kotlin/com/github/pyvenvmanage/actions/ConfigurePythonActionAbstract.kt @@ -27,18 +27,23 @@ abstract class ConfigurePythonActionAbstract : AnAction() { // - any files within the binary folder. e.presentation.isEnabledAndVisible = when (val selectedPath = e.getData(CommonDataKeys.VIRTUAL_FILE)) { - null -> false - else -> + null -> { + false + } + + else -> { when (selectedPath.isDirectory) { true -> { // check if there is a python executable available under this folder -> name match for binary PythonSdkUtil.getPythonExecutable(selectedPath.path) != null } + false -> { // check for presence of the activate_this.py + activate alongside or pyvenv.cfg above PythonSdkUtil.isVirtualEnv(selectedPath.path) } } + } } }