From 63f687aaab7fca12fcae19363b335e36f76a786f Mon Sep 17 00:00:00 2001 From: WarningImHack3r <43064022+WarningImHack3r@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:51:21 +0200 Subject: [PATCH] Fixes --- build.gradle.kts | 4 ++-- qodana.yml | 2 +- .../intellijshadcnplugin/backend/helpers/DependencyManager.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index a3ac76c..20d9e7d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -80,7 +80,7 @@ intellijPlatform { (getOrNull(pluginVersion) ?: getUnreleased()) .withHeader(false) .withEmptySections(false), - Changelog.OutputType.HTML, + Changelog.OutputType.HTML ) } } @@ -147,7 +147,7 @@ val runIdeForUiTests by intellijPlatformTesting.runIde.registering { "-Drobot-server.port=8082", "-Dide.mac.message.dialogs.as.sheets=false", "-Djb.privacy.policy.text=", - "-Djb.consents.confirmation.enabled=false", + "-Djb.consents.confirmation.enabled=false" ) } } diff --git a/qodana.yml b/qodana.yml index 200f48c..cbf640f 100644 --- a/qodana.yml +++ b/qodana.yml @@ -3,7 +3,7 @@ version: 1.0 linter: jetbrains/qodana-jvm-community:latest -projectJDK: "11" +projectJDK: "17" profile: name: qodana.recommended exclude: diff --git a/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/DependencyManager.kt b/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/DependencyManager.kt index 61d4608..4ad48bf 100644 --- a/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/DependencyManager.kt +++ b/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/DependencyManager.kt @@ -42,7 +42,7 @@ class DependencyManager(private val project: Project) { private fun getPackageManager(): PackageManager? { val fileManager = FileManager.getInstance(project) - return enumValues().firstOrNull { packageManager -> + return PackageManager.entries.firstOrNull { packageManager -> packageManager.getLockFilesNames().any { lockFile -> fileManager.getVirtualFilesByName(lockFile).isNotEmpty() }