Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support for 2024.1 #23

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: "0 8 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# PyVenvManage Changelog

## [1.4.0]
### Fixed
- Fix support for 2024.1
-
## [1.3.4]
### Fixed
- Fix support for 2021.3
Expand Down Expand Up @@ -32,4 +36,3 @@
### Changed
- change items
-->

26 changes: 13 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,16 +37,16 @@ dependencies {

tasks {
withType<JavaCompile> {
sourceCompatibility = "11"
targetCompatibility = "11"
sourceCompatibility = "17"
targetCompatibility = "17"
}
listOf("compileKotlin", "compileTestKotlin").forEach {
getByName<KotlinCompile>(it) {
kotlinOptions.jvmTarget = "11"
kotlinOptions.jvmTarget = "17"
}
}
withType<Detekt> {
jvmTarget = "11"
jvmTarget = "17"
reports {
html.required.set(true)
}
Expand Down Expand Up @@ -79,7 +79,7 @@ intellij {
}

detekt {
config = files("./detekt-config.yml")
config.setFrom("./detekt-config.yml")
buildUponDefaultConfig = true
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/github/pyvenvmanage/VenvIconProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/icons/PyVenvManageIcons.java

This file was deleted.