diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index ae76093..5cd7b23 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -6,7 +6,7 @@ on: - cron: "0 8 * * *" concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 17 - name: Setup Gradle uses: gradle/gradle-build-action@v3 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 3927af0..433114e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,7 +10,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 17 - name: Setup Gradle uses: gradle/gradle-build-action@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3657eda..66522c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ # PyVenvManage Changelog +## [1.4.0] +### Fixed +- Fix support for 2024.1 +- ## [1.3.4] ### Fixed - Fix support for 2021.3 @@ -32,4 +36,3 @@ ### Changed - change items --> - diff --git a/build.gradle.kts b/build.gradle.kts index a56691e..2fc6eb3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,24 +5,24 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("java") - id("org.jetbrains.kotlin.jvm") version "1.9.10" - id("org.jetbrains.intellij") version "1.16.0" + id("org.jetbrains.kotlin.jvm") version "1.9.23" + id("org.jetbrains.intellij") version "1.17.3" id("org.jetbrains.changelog") version "1.3.1" - id("io.gitlab.arturbosch.detekt") version "1.23.1" + id("io.gitlab.arturbosch.detekt") version "1.23.6" id("org.jlleitschuh.gradle.ktlint") version "11.6.1" } val pluginGroup: String = "com.github.pyvenvmanage.pyvenv" val pluginNameG: String = "PyVenv Manage" -val pluginVersion: String = "1.3.10" -val pluginSinceBuild = "211" +val pluginVersion: String = "1.4.0" +val pluginSinceBuild = "241" val pluginUntilBuild = "" // https://www.jetbrains.com/idea/download/other.html -val pluginVerifierIdeVersions = "222.4345.14" +val pluginVerifierIdeVersions = "241.14494.240" val platformType = "IC" -val platformVersion = "2021.1" +val platformVersion = "2024.1" // PythonCore https://plugins.jetbrains.com/plugin/631-python/versions -var usePlugins = "PythonCore:211.6693.111" +var usePlugins = "PythonCore:241.14494.240" group = pluginGroup version = pluginVersion @@ -37,16 +37,16 @@ dependencies { tasks { withType { - sourceCompatibility = "11" - targetCompatibility = "11" + sourceCompatibility = "17" + targetCompatibility = "17" } listOf("compileKotlin", "compileTestKotlin").forEach { getByName(it) { - kotlinOptions.jvmTarget = "11" + kotlinOptions.jvmTarget = "17" } } withType { - jvmTarget = "11" + jvmTarget = "17" reports { html.required.set(true) } @@ -79,7 +79,7 @@ intellij { } detekt { - config = files("./detekt-config.yml") + config.setFrom("./detekt-config.yml") buildUponDefaultConfig = true } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f398c33..20db9ad 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-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/com/github/pyvenvmanage/ConfigureModulePythonVenv.java b/src/main/java/com/github/pyvenvmanage/ConfigureModulePythonVenv.java index 80432cc..01b22c6 100644 --- a/src/main/java/com/github/pyvenvmanage/ConfigureModulePythonVenv.java +++ b/src/main/java/com/github/pyvenvmanage/ConfigureModulePythonVenv.java @@ -16,8 +16,6 @@ public class ConfigureModulePythonVenv extends ConfigurePythonVenv { - private final String POPUP_ITEM_TEXT = "Set module venv for %s"; - protected void setInterpreter(Project project, VirtualFile file, String pythonExecutable) { Sdk sdk = findExistingSdkForExecutable(pythonExecutable, project); if (sdk == null) { @@ -41,6 +39,7 @@ public void update(@NotNull AnActionEvent e) { Project project = e.getProject(); Module module = ProjectFileIndex.getInstance(project).getModuleForFile(file, false); if (null != module) { + String POPUP_ITEM_TEXT = "Set module venv for %s"; e.getPresentation().setText(String.format(POPUP_ITEM_TEXT, module.getName())); e.getPresentation().setEnabledAndVisible(true); return; diff --git a/src/main/java/com/github/pyvenvmanage/ConfigurePythonVenv.java b/src/main/java/com/github/pyvenvmanage/ConfigurePythonVenv.java index df3b640..b54f71d 100644 --- a/src/main/java/com/github/pyvenvmanage/ConfigurePythonVenv.java +++ b/src/main/java/com/github/pyvenvmanage/ConfigurePythonVenv.java @@ -5,8 +5,6 @@ package com.github.pyvenvmanage; -import com.intellij.notification.Notification; -import com.intellij.notification.NotificationGroup; import com.intellij.notification.NotificationGroupManager; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; diff --git a/src/main/java/com/github/pyvenvmanage/VenvIconProvider.java b/src/main/java/com/github/pyvenvmanage/VenvIconProvider.java index fbf7dcd..f9f6f53 100644 --- a/src/main/java/com/github/pyvenvmanage/VenvIconProvider.java +++ b/src/main/java/com/github/pyvenvmanage/VenvIconProvider.java @@ -10,8 +10,8 @@ import com.intellij.openapi.util.Iconable; import com.intellij.psi.PsiDirectory; import com.intellij.psi.PsiElement; +import com.jetbrains.python.icons.PythonIcons; import com.jetbrains.python.sdk.PythonSdkUtil; -import icons.PythonIcons; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -28,7 +28,7 @@ public Icon getIcon(@NotNull PsiElement element, int flags) { final String venvRootPath = ((PsiDirectory) element).getVirtualFile().getPath(); if (PythonSdkUtil.getPythonExecutable(venvRootPath) != null) { return PythonIcons.Python.Virtualenv; - }; + } } return null; } @@ -40,7 +40,7 @@ public Icon getLayerIcon(@NotNull Iconable element, boolean isLocked) { final String venvRootPath = ((PsiDirectory) element).getVirtualFile().getPath(); if (PythonSdkUtil.getPythonExecutable(venvRootPath) != null) { return PythonIcons.Python.Virtualenv; - }; + } } return null; } diff --git a/src/main/java/icons/PyVenvManageIcons.java b/src/main/java/icons/PyVenvManageIcons.java deleted file mode 100644 index b1350a3..0000000 --- a/src/main/java/icons/PyVenvManageIcons.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (C) 2020 Nokia - */ - -package icons; - -import icons.PythonIcons; - -import javax.swing.Icon; - -public interface PyVenvManageIcons { - Icon CONFIGURE_VENV = PythonIcons.Python.Python; -}