Skip to content

Commit c6ae778

Browse files
committed
CM-38753 - Add support for IDEs 2024.2; drop support for IDEs 2021 and 2022
1 parent 3636076 commit c6ae778

34 files changed

+121
-114
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
uses: actions/setup-java@v3
5151
with:
5252
distribution: zulu
53-
java-version: 11
53+
java-version: 17
5454

5555
- name: Setup Gradle
5656
uses: gradle/[email protected]
@@ -112,7 +112,7 @@ jobs:
112112
# uses: actions/setup-java@v3
113113
# with:
114114
# distribution: zulu
115-
# java-version: 11
115+
# java-version: 17
116116
#
117117
# - name: Setup Gradle
118118
# uses: gradle/[email protected]
@@ -186,7 +186,7 @@ jobs:
186186
uses: actions/setup-java@v3
187187
with:
188188
distribution: zulu
189-
java-version: 11
189+
java-version: 17
190190

191191
- name: Setup Gradle
192192
uses: gradle/[email protected]

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
## [Unreleased]
66

7+
## [1.9.6] - 2024-08-20
8+
9+
- Add support for IDEs 2024.2
10+
- Drop support for IDEs 2021 and 2022
11+
712
## [1.9.5] - 2024-07-30
813

914
- Fix UI tree component loading in new IDE versions
@@ -111,6 +116,8 @@
111116

112117
The first public release of the plugin.
113118

119+
[1.9.6]: https://github.com/cycodehq/intellij-platform-plugin/releases/tag/v1.9.6
120+
114121
[1.9.5]: https://github.com/cycodehq/intellij-platform-plugin/releases/tag/v1.9.5
115122

116123
[1.9.4]: https://github.com/cycodehq/intellij-platform-plugin/releases/tag/v1.9.4
@@ -155,4 +162,4 @@ The first public release of the plugin.
155162

156163
[1.0.0]: https://github.com/cycodehq/intellij-platform-plugin/releases/tag/v1.0.0
157164

158-
[Unreleased]: https://github.com/cycodehq/intellij-platform-plugin/compare/v1.9.5...HEAD
165+
[Unreleased]: https://github.com/cycodehq/intellij-platform-plugin/compare/v1.9.6...HEAD

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ dependencies {
2828
implementation(libs.flexmark)
2929
}
3030

31-
// Set the JVM language level used to build the project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+.
31+
// Set the JVM language level used to build the project. We are using Java 17 for 2022.2+.
3232
kotlin {
33-
jvmToolchain(11)
33+
jvmToolchain(17)
3434
}
3535

3636
java {
3737
toolchain {
38-
languageVersion.set(JavaLanguageVersion.of(11))
38+
languageVersion.set(JavaLanguageVersion.of(17))
3939
vendor.set(JvmVendorSpec.AZUL)
4040
}
4141
}

gradle.properties

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ pluginGroup = com.cycode.plugin
44
pluginName = Cycode
55
pluginRepositoryUrl = https://github.com/cycodehq/intellij-platform-plugin
66
# SemVer format -> https://semver.org
7-
pluginVersion = 1.9.5
7+
pluginVersion = 1.9.6
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
10-
pluginSinceBuild = 211.1
11-
pluginUntilBuild = 241.*
10+
pluginSinceBuild = 231
11+
pluginUntilBuild = 242.*
1212

1313
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
1414
platformType = IC
15-
# starting from Apple Silicon support + fixes for development on Apple Silicon
16-
# ref: https://youtrack.jetbrains.com/issue/IDEA-260376
17-
platformVersion = 2021.1
15+
# 2021.1 - Apple Silicon support + fixes for development on Apple Silicon
16+
# 2022.3 - minimum version for IntelliJ Platform Gradle Plugin (2.x)
17+
# 2023.1 - allows to fix "com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated blabla"
18+
platformVersion = 2023.1
1819

1920
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
2021
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22

gradle/libs.versions.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[versions]
22
# libraries
3-
annotations = "24.0.1"
4-
jackson = "2.15.2"
3+
annotations = "24.1.0"
4+
jackson = "2.17.2"
55
flexmark = "0.64.8"
66

77
# plugins
8-
dokka = "1.9.10"
9-
kotlin = "1.9.20"
10-
changelog = "2.2.0"
11-
gradleIntelliJPlugin = "1.17.1"
8+
dokka = "1.9.20"
9+
kotlin = "2.0.10"
10+
changelog = "2.2.1"
11+
gradleIntelliJPlugin = "1.17.4" # the latest before 2.0 with a lot of breaking changes
1212
kover = "0.7.3"
13-
sentry = "4.9.0"
13+
sentry = "4.11.0"
1414

1515
[libraries]
1616
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }

src/main/kotlin/com/cycode/plugin/annotators/annotationAppliers/IacApplier.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import com.intellij.psi.PsiFile
1212
import java.io.File
1313

1414
class IacApplier(private val scanResults: ScanResultsService) : AnnotationApplierBase() {
15-
private fun validateIacTextRange(textRange: TextRange, psiFile: PsiFile): Boolean {
15+
private fun validateIacTextRange(): Boolean {
1616
// FIXME(MarshalX): for now, I dont see any way to validate the text range for IaC
1717
// small explanation:
1818
// - IaC doesn't provide end positions, so we have to calculate them from the line number (get the last character in the line)
@@ -41,7 +41,7 @@ class IacApplier(private val scanResults: ScanResultsService) : AnnotationApplie
4141
val detectionDetails = detection.detectionDetails
4242
val textRange = TextRange(startOffset, endOffset)
4343

44-
if (!validateTextRange(textRange, psiFile) || !validateIacTextRange(textRange, psiFile)) {
44+
if (!validateTextRange(textRange, psiFile) || !validateIacTextRange()) {
4545
return@forEach
4646
}
4747

src/main/kotlin/com/cycode/plugin/annotators/annotationAppliers/SastApplier.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import com.intellij.openapi.util.TextRange
1111
import com.intellij.psi.PsiFile
1212

1313
class SastApplier(private val scanResults: ScanResultsService) : AnnotationApplierBase() {
14-
private fun validateSastTextRange(textRange: TextRange, psiFile: PsiFile): Boolean {
14+
private fun validateSastTextRange(): Boolean {
1515
// FIXME(MarshalX): for now, I dont see any way to validate the text range for SAST
1616
// small explanation:
1717
// - SAST doesn't provide end positions, so we have to calculate them from the line number (get the last character in the line)
@@ -40,7 +40,7 @@ class SastApplier(private val scanResults: ScanResultsService) : AnnotationAppli
4040
val detectionDetails = detection.detectionDetails
4141
val textRange = TextRange(startOffset, endOffset)
4242

43-
if (!validateTextRange(textRange, psiFile) || !validateSastTextRange(textRange, psiFile)) {
43+
if (!validateTextRange(textRange, psiFile) || !validateSastTextRange()) {
4444
return@forEach
4545
}
4646

src/main/kotlin/com/cycode/plugin/annotators/utils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.intellij.openapi.util.TextRange
55
import com.intellij.psi.PsiFile
66

77
fun convertSeverity(severity: String): HighlightSeverity {
8-
return when (severity.toLowerCase()) {
8+
return when (severity.lowercase()) {
99
"critical" -> HighlightSeverity.ERROR
1010
"high" -> HighlightSeverity.ERROR
1111
"medium" -> HighlightSeverity.WARNING

src/main/kotlin/com/cycode/plugin/cli/CliWrapper.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.cycode.plugin.cli
33
import com.cycode.plugin.cli.models.CliError
44
import com.cycode.plugin.services.pluginSettings
55
import com.fasterxml.jackson.databind.DeserializationFeature
6+
import com.fasterxml.jackson.databind.ObjectMapper
67
import com.fasterxml.jackson.databind.PropertyNamingStrategies
78
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
89
import com.fasterxml.jackson.module.kotlin.readValue
@@ -29,7 +30,7 @@ class CliOSProcessHandler(commandLine: GeneralCommandLine) : OSProcessHandler(co
2930
class CliWrapper(val executablePath: String, val workDirectory: String? = null) {
3031
val pluginSettings = pluginSettings()
3132

32-
var mapper = jacksonObjectMapper()
33+
var mapper: ObjectMapper = jacksonObjectMapper()
3334
.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE)
3435
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
3536

src/main/kotlin/com/cycode/plugin/cli/ErrorHandling.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ enum class ErrorCode {
1010
const val MISSING_C_STANDARD_LIBRARY_SEARCH = "GLIBC"
1111

1212
private fun caseInsensitiveSearch(output: String, search: String): Boolean {
13-
return output.toLowerCase().contains(search.toLowerCase())
13+
return output.lowercase().contains(search.lowercase())
1414
}
1515

1616
fun detectErrorCode(output: String): ErrorCode {

0 commit comments

Comments
 (0)