After updating to intellij 2023.3 my plugin is incompatible and does not build anymore
已回答
Build error
.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2023.3/6105b81c6142f62379ad6c5afb542c77350a71eb/ideaIC-2023.3/lib/app-client.jar!/META-INF/intellij.platform.analysis.impl.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
build.gradle.kts
plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.7.22"
id("org.jetbrains.intellij") version "1.16.1"
}
group = “mygroup”
version = "1.0.0"
repositories {
mavenCentral()
}
intellij {
version.set("2023.3") // updated from 2023.2.2
type.set("IC")
plugins.set(listOf("Git4Idea"))
}
dependencies {
implementation("com.squareup.okhttp3:okhttp:4.10.0")
}
tasks {
withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
patchPluginXml {
sinceBuild.set("231.9392.1")
}
signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}
publishPlugin {
token.set(System.getenv("PUBLISH_TOKEN"))
}
}
请先登录再写评论。
Hi,
Could you please try deleting build and .gradle directories in your project and see if it helps?
Also, why do you target JVM 11 in Kotlin compilation and 17 in Java?
I updated kotlinOptions.jvmTarget to 17 and deleted the folders, Unfortunately it does not work.
Please fix your configuration in the first place:
If the issue remains, please provide the full stacktrace.
I works, now. Thanks a lot!