'`kotlinx.serialization` plugin in `build.gradle.kts` isn't caught up by the Idea IDE
I'm currently trying to set up kotlin serialization for my project, and keep getting this error from the Idea IDE on usage of @Serializable decorator
kotlinx.serialization compiler plugin is not applied to the module, so this annotation would not be processed. Make sure that you've setup your buildscript correctly and re-import project.
My build.gradle.kts contains that, which is just right according to the setup guide in their repo:
plugins {
kotlin("jvm") version "1.6.10"
kotlin("plugin.serialization") version "1.6.10"
java
}
dependencies {
implementation(kotlin("stdlib"))
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
implementation(kotlin("script-runtime"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
}
It does compile and run as intended, the example in the repo i linked above works just right. But IntelliJ Idea still keeps showing me this error.
I've tried reloading gradle project, invalidating index, and restarting my IDE few times.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
