Skip to content

Commit

Permalink
Fix deprecations (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellizio authored Nov 14, 2024
2 parents 835ce0a + c17390f commit 9eb4789
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'corretto'
- uses: actions/cache@v2
with:
path: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- run: ./gradlew :rdgen
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'corretto'
- run: ./gradlew :protocol:rdgen
- run: ./gradlew :buildPlugin -PBuildConfiguration=Release
- run: ./gradlew :signPlugin -PBuildConfiguration=Release
env:
Expand All @@ -26,7 +30,6 @@ jobs:
find: 'release/'
replace: ''
- uses: actions/upload-artifact@v3
if: always()
with:
name: odata-cli-ui.${{ steps.fix_branch_name.outputs.value }}
path: output
23 changes: 14 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import com.jetbrains.plugin.structure.base.utils.isFile
import groovy.ant.FileNameFinder
import org.apache.tools.ant.taskdefs.condition.Os
import org.jetbrains.intellij.platform.gradle.Constants
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import java.io.ByteArrayOutputStream

plugins {
Expand Down Expand Up @@ -68,22 +67,28 @@ sourceSets {
}
}

tasks.compileJava {
sourceCompatibility = JavaVersion.VERSION_21.toString()
targetCompatibility = JavaVersion.VERSION_21.toString()
}

tasks.compileKotlin {
kotlinOptions { jvmTarget = "17" }
kotlinOptions { jvmTarget = "21" }
}

intellijPlatform {
pluginVerification {
cliPath = File("/libs/verifier-cli-1.373-all.jar") // https://github.com/JetBrains/intellij-plugin-verifier
ides {
ides(listOf(
"RD-2024.1",
"RD-2024.1.1",
"RD-2024.1.2",
"RD-2024.1.3",
"RD-2024.1.4",
"RD-2024.1.5",
"RD-2024.1.6"
"RD-2024.2",
"RD-2024.2.1",
"RD-2024.2.2",
"RD-2024.2.3",
"RD-2024.2.4",
"RD-2024.2.5",
"RD-2024.2.6",
"RD-2024.2.7"
))
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PublishToken="_PLACEHOLDER_"
# Release: 2020.2
# EAP: 2020.3-EAP2-SNAPSHOT
# Nightly: 2020.3-SNAPSHOT
ProductVersion=2024.1
ProductVersion=2024.2

# Kotlin 1.4 will bundle the stdlib dependency by default, causing problems with the version bundled with the IDE
# https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-rc-released/#stdlib-default
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[versions]
kotlin = "1.8.20" # https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
kotlin = "1.9.24" # https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
rdGen = "2024.1.1" # https://github.com/JetBrains/rd/releases
intellijPlatform = "2.0.1" # https://github.com/JetBrains/intellij-platform-gradle-plugin/releases
gradleJvmWrapper = "0.14.0" # https://github.com/JetBrains/intellij-platform-gradle-plugin/releases
gradleJvmWrapper = "0.14.0" # https://github.com/mfilippov/gradle-jvm-wrapper

[libraries]
kotlinStdLib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }
Expand Down
2 changes: 1 addition & 1 deletion src/dotnet/Plugin.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<!-- See https://www.nuget.org/packages/JetBrains.ReSharper.SDK -->
<!-- Keep in sync with ProductVersion in gradle.properties -->
<SdkVersion>2024.1.0</SdkVersion>
<SdkVersion>2024.2.0</SdkVersion>

<Title>OData CLI UI</Title>
<Description>Description</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.intellij.execution.ui.ConsoleView
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.application.EDT
import com.intellij.openapi.project.Project
import com.intellij.openapi.rd.util.*
import com.intellij.openapi.vfs.VirtualFileManager
Expand All @@ -19,6 +20,8 @@ import com.jetbrains.rider.projectView.actions.isProjectModelReady
import com.jetbrains.rider.projectView.solution
import com.jetbrains.rider.projectView.workspace.isProject
import com.jetbrains.rider.projectView.workspace.isWebReferenceFolder
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import ru.ellizio.odatacliui.extensions.printCommandError
import ru.ellizio.odatacliui.models.ActionMetadata
import ru.ellizio.odatacliui.terminal.executors.CommandLineExecutor
Expand All @@ -33,7 +36,7 @@ class OpenCliDialogAction : AnAction() {
project.lifetime.launchOnUi {
val dialog = CliDialog(dialogModel)
if (dialog.showAndGet()) {
withBackgroundContext {
withContext(Dispatchers.IO) {
executeCommand(project, actionMetadata, dialogModel)
}
}
Expand All @@ -54,8 +57,8 @@ class OpenCliDialogAction : AnAction() {

private suspend fun executeCommand(project: Project, metadata: ActionMetadata, model: CliDialogModel)
{
var consoleView: ConsoleView? = null
withUiContext {
var consoleView: ConsoleView?
withContext(Dispatchers.EDT) {
consoleView = CliToolWindowManager.getInstance(project).instantiateConsole()
}

Expand Down
2 changes: 1 addition & 1 deletion src/rider/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>OData CLI UI</name>
<version>_PLACEHOLDER_</version>
<vendor url="https://github.com/ellizio/odata-cli-ui">ellizio</vendor>
<idea-version since-build="241" until-build="241.*" />
<idea-version since-build="242" until-build="242.*" />
<depends>com.intellij.modules.rider</depends>
<depends>org.jetbrains.plugins.terminal</depends>
<resource-bundle>UiBundle</resource-bundle>
Expand Down

0 comments on commit 9eb4789

Please sign in to comment.