diff --git a/.run/Run Plugin Verification.run.xml b/.run/Run Verifications.run.xml
similarity index 81%
rename from .run/Run Plugin Verification.run.xml
rename to .run/Run Verifications.run.xml
index 3a8d688..32783f5 100644
--- a/.run/Run Plugin Verification.run.xml
+++ b/.run/Run Verifications.run.xml
@@ -11,7 +11,7 @@
@@ -19,8 +19,7 @@
true
true
false
-
-
-
+ false
+
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index 7621fe8..f32b470 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -2,7 +2,9 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
+import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
+import org.jetbrains.intellij.platform.gradle.models.ProductRelease
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -71,7 +73,7 @@ intellijPlatform {
version = properties("pluginVersion")
ideaVersion {
sinceBuild = properties("pluginSinceBuild")
- untilBuild = properties("pluginUntilBuild")
+ untilBuild = provider { null }
}
val changelog = project.changelog // local variable for configuration cache compatibility
// Get the latest available change notes from the changelog file
@@ -86,6 +88,16 @@ intellijPlatform {
}
}
}
+ pluginVerification {
+ ides {
+ select {
+ types = listOf(IntelliJPlatformType.fromCode(properties("platformType")))
+ channels = listOf(ProductRelease.Channel.RELEASE)
+ sinceBuild = properties("pluginSinceBuild")
+ untilBuild = provider { null }
+ }
+ }
+ }
}
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
@@ -122,7 +134,7 @@ tasks {
withType {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(it)
- apiVersion = KotlinVersion.KOTLIN_2_0
+ apiVersion = KotlinVersion.KOTLIN_1_8
}
}
}
diff --git a/gradle.properties b/gradle.properties
index 5162aef..4ed79f4 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -4,15 +4,11 @@
pluginGroup = com.github.bridgecrewio.prismajetbrainsidea
pluginName = Prisma Cloud
pluginVersion=1.0.22
-# 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=2020.3.4, 2021.1.3, 2021.2.4, 2024.1.6
platformType = IC
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild=203
-pluginUntilBuild=242.*
-platformVersion=2024.2.1
+platformVersion=2023.3.8
platformDownloadSources = true
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
@@ -25,7 +21,10 @@ platformBundledPlugins=
kotlin.stdlib.default.dependency = false
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
-javaVersion=17
+# TODO: Change to 21 on next version
+javaVersion=11
# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion=8.10.1
+
+org.gradle.jvmargs=-Xmx1024m "-XX:MaxMetaspaceSize=512m
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 455ac40..b268ae6 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -3,7 +3,7 @@
# libraries
jackson = "2.17.2"
lombok = "1.18.34"
-springWeb = "6.1.12"
+springWeb = "5.3.39" # TODO: Change to 6.x.x when moving to Java 17+
commons-io = "2.16.1"
slf4j = "2.0.16"
logback = "1.5.6"
@@ -15,7 +15,7 @@ junitPlatform = "1.9.0"
# plugins
changelog = "2.2.1"
intelliJPlatform = "2.0.1"
-kotlin = "2.0.20"
+kotlin = "1.8.22" # TODO: Change to 2.0.x on next version
kover = "0.8.3"
qodana = "0.1.13"
diff --git a/src/main/java/com/bridgecrew/log/LoggerService.java b/src/main/java/com/bridgecrew/log/LoggerService.java
index 199ebf5..d33b1d8 100644
--- a/src/main/java/com/bridgecrew/log/LoggerService.java
+++ b/src/main/java/com/bridgecrew/log/LoggerService.java
@@ -8,6 +8,7 @@
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.components.Service;
import org.slf4j.LoggerFactory;
+
import java.net.URL;
@Service
@@ -17,8 +18,8 @@ public String getLogFilePath() {
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
ch.qos.logback.classic.Logger rootLogger = loggerContext.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
Appender> appender = rootLogger.getAppender("FILE");
- if (appender instanceof FileAppender> fileAppender) {
- return fileAppender.getFile();
+ if (appender instanceof FileAppender) {
+ return ((FileAppender>)appender).getFile();
}
return null;
}
diff --git a/src/main/kotlin/com/bridgecrew/activities/PostStartupActivity.kt b/src/main/kotlin/com/bridgecrew/activities/PostStartupActivity.kt
index dfd29ce..13c6875 100644
--- a/src/main/kotlin/com/bridgecrew/activities/PostStartupActivity.kt
+++ b/src/main/kotlin/com/bridgecrew/activities/PostStartupActivity.kt
@@ -16,16 +16,16 @@ import com.intellij.ide.plugins.PluginStateListener
import com.intellij.openapi.components.service
import com.intellij.openapi.extensions.PluginId
import com.intellij.openapi.project.Project
-import com.intellij.openapi.startup.ProjectActivity
+import com.intellij.openapi.startup.StartupActivity
import com.intellij.openapi.vfs.LocalFileSystem
import org.slf4j.LoggerFactory
import java.util.*
-class PostStartupActivity : ProjectActivity {
+class PostStartupActivity : StartupActivity {
private val logger = LoggerFactory.getLogger(javaClass)
- override suspend fun execute(project: Project) {
+ override fun runActivity(project: Project) {
ApplicationServiceUtil.getService(LoggerService::class.java).initializeLogger()
val version = PluginManagerCore.getPlugin(PluginId.getId("com.github.bridgecrewio.prismacloud"))?.version
logger.info("Starting Prisma Cloud JetBrains plugin version $version")
diff --git a/src/main/kotlin/com/bridgecrew/ui/actions/CheckovScanAction.kt b/src/main/kotlin/com/bridgecrew/ui/actions/CheckovScanAction.kt
index 6283f32..cc9940b 100644
--- a/src/main/kotlin/com/bridgecrew/ui/actions/CheckovScanAction.kt
+++ b/src/main/kotlin/com/bridgecrew/ui/actions/CheckovScanAction.kt
@@ -3,7 +3,6 @@ package com.bridgecrew.ui.actions
import com.bridgecrew.analytics.AnalyticsService
import com.bridgecrew.services.scan.CheckovScanService
import com.intellij.icons.AllIcons
-import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.Presentation
@@ -20,9 +19,10 @@ object CheckovScanAction : AnAction(), DumbAware {
presentation.isEnabled = false
}
- override fun getActionUpdateThread(): ActionUpdateThread {
- return ActionUpdateThread.EDT
- }
+// TODO: Uncomment when moving to Kotlin 2 + Java 21
+// override fun getActionUpdateThread(): ActionUpdateThread {
+// return ActionUpdateThread.EDT
+// }
override fun actionPerformed(actionEvent: AnActionEvent) {
val project = actionEvent.project
diff --git a/src/main/kotlin/com/bridgecrew/ui/actions/ShowLogFileAction.kt b/src/main/kotlin/com/bridgecrew/ui/actions/ShowLogFileAction.kt
index 5f579cf..3960caa 100644
--- a/src/main/kotlin/com/bridgecrew/ui/actions/ShowLogFileAction.kt
+++ b/src/main/kotlin/com/bridgecrew/ui/actions/ShowLogFileAction.kt
@@ -3,7 +3,6 @@ package com.bridgecrew.ui.actions
import com.bridgecrew.icons.CheckovIcons
import com.bridgecrew.log.LoggerService
import com.bridgecrew.util.ApplicationServiceUtil
-import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.Presentation
@@ -22,9 +21,10 @@ class ShowLogFileAction : AnAction(), DumbAware {
presentation.icon = CheckovIcons.showLogsIcon
}
- override fun getActionUpdateThread(): ActionUpdateThread {
- return ActionUpdateThread.EDT
- }
+// TODO: Uncomment when moving to Kotlin 2 + Java 21
+// override fun getActionUpdateThread(): ActionUpdateThread {
+// return ActionUpdateThread.EDT
+// }
override fun actionPerformed(event: AnActionEvent) {
val logFilePath = ApplicationServiceUtil.getService(LoggerService::class.java).getLogFilePath()