1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-06-04 01:34:04 +02:00

Start using kotlin 2.0

Originally this is needed to update the dependency on AceJump, which uses the kotlin 2.0 compiler, and its classes are not compatible with the old compiler
This commit is contained in:
Alex Plate 2024-07-19 17:13:23 +03:00
parent 7e28deb328
commit 4a85058ba2
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F
7 changed files with 12 additions and 10 deletions
.gitignore
annotation-processors
build.gradle.ktsgradle.properties
src/test/java/org/jetbrains/plugins/ideavim/action/copy
vim-engine
build.gradle.kts
src/main/kotlin/com/maddyhome/idea/vim/api

2
.gitignore vendored
View File

@ -33,3 +33,5 @@ vim-engine/src/main/java/com/maddyhome/idea/vim/regexp/parser/generated
# Created by github automation # Created by github automation
settings.xml settings.xml
.kotlin

View File

@ -8,7 +8,7 @@
plugins { plugins {
kotlin("jvm") kotlin("jvm")
kotlin("plugin.serialization") version "1.9.22" kotlin("plugin.serialization") version "2.0.0"
} }
val kotlinxSerializationVersion: String by project val kotlinxSerializationVersion: String by project

View File

@ -45,7 +45,7 @@ buildscript {
} }
dependencies { dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0")
classpath("com.github.AlexPl292:mark-down-to-slack:1.1.2") classpath("com.github.AlexPl292:mark-down-to-slack:1.1.2")
classpath("org.eclipse.jgit:org.eclipse.jgit:6.6.0.202305301015-r") classpath("org.eclipse.jgit:org.eclipse.jgit:6.6.0.202305301015-r")
@ -66,14 +66,14 @@ buildscript {
plugins { plugins {
java java
kotlin("jvm") version "1.9.22" kotlin("jvm") version "2.0.0"
application application
id("java-test-fixtures") id("java-test-fixtures")
id("org.jetbrains.intellij.platform") version "2.0.0-beta9" id("org.jetbrains.intellij.platform") version "2.0.0-beta9"
id("org.jetbrains.changelog") version "2.2.1" id("org.jetbrains.changelog") version "2.2.1"
id("org.jetbrains.kotlinx.kover") version "0.6.1" id("org.jetbrains.kotlinx.kover") version "0.6.1"
id("com.dorongold.task-tree") version "4.0.0" id("com.dorongold.task-tree") version "4.0.0"
id("com.google.devtools.ksp") version "1.9.22-1.0.17" id("com.google.devtools.ksp") version "2.0.0-1.0.23"
} }
val moduleSources by configurations.registering val moduleSources by configurations.registering

View File

@ -34,7 +34,7 @@ splitModeVersion=242-EAP-SNAPSHOT
# Please don't forget to update kotlin version in buildscript section # Please don't forget to update kotlin version in buildscript section
# Also update kotlinxSerializationVersion version # Also update kotlinxSerializationVersion version
kotlinVersion=1.9.22 kotlinVersion=2.0.0
publishToken=token publishToken=token
publishChannels=eap publishChannels=eap

View File

@ -175,8 +175,8 @@ class PutTestAfterCursorActionTest : VimTestCase() {
override fun collectTransferableData( override fun collectTransferableData(
file: PsiFile, file: PsiFile,
editor: Editor, editor: Editor,
startOffsets: IntArray?, startOffsets: IntArray,
endOffsets: IntArray?, endOffsets: IntArray,
): List<TextBlockTransferableData> { ): List<TextBlockTransferableData> {
return emptyList() return emptyList()
} }

View File

@ -10,8 +10,8 @@ plugins {
java java
kotlin("jvm") kotlin("jvm")
// id("org.jlleitschuh.gradle.ktlint") // id("org.jlleitschuh.gradle.ktlint")
id("com.google.devtools.ksp") version "1.9.22-1.0.17" id("com.google.devtools.ksp") version "2.0.0-1.0.23"
kotlin("plugin.serialization") version "1.9.22" kotlin("plugin.serialization") version "2.0.0"
`maven-publish` `maven-publish`
antlr antlr
} }

View File

@ -136,7 +136,7 @@ abstract class VimOptionGroupBase : VimOptionGroup {
} }
override fun <T : VimDataType> resetToGlobalValue(option: Option<T>, scope: OptionAccessScope, editor: VimEditor) { override fun <T : VimDataType> resetToGlobalValue(option: Option<T>, scope: OptionAccessScope, editor: VimEditor) {
val newValue = if (scope is OptionAccessScope.LOCAL && option.declaredScope.isGlobalLocal() val newValue: OptionValue<T> = if (scope is OptionAccessScope.LOCAL && option.declaredScope.isGlobalLocal()
&& (option is NumberOption || option is ToggleOption)) { && (option is NumberOption || option is ToggleOption)) {
OptionValue.Default(option.unsetValue) OptionValue.Default(option.unsetValue)
} }