"Using Kotlin Serialization requires Kotlin compiler 1.3.0 or higher. Make sure that you have corresponding Kotlin plugin installed in the IDE. Since serialization is now bundled into Kotlin plugin, no additional actions in IDE are required"
Okay fine.. Let's play.
But wait.. a little later.. isn't this an pretty big action?
"Delegate build to Gradle: (Settings - Build, Execution, Deployment - Build Tools - Gradle - Runner - tick Delegate IDE build/run actions to gradle). "
Maybe we're using different terminology, but it sure sounds to me from first sentence that I don't have to muck about with settings - an "IDE action", but it seems I do (in a rather big way).
--
Someone seems to have foot noted this confusion even:
Serialization support should work out of the box, if you have 1.3 Kotlin plugin installed. You still have to delegate build to Gradle (Settings - Build, Execution, Deployment - Build Tools - Gradle - Runner - tick Delegate IDE build/run actions to gradle). In case of problems, force project re-import from Gradle.
--
Let's call a spade a spade, and 99% 99%. There are additional steps/actions required to use Kotlinx with IntelliJ.
It is a known problem and it would likely be fixed in the next release of the Kotlin plugin
Starting from Kotlin 1.3.11, build delegation is not required for Gradle.
Hi All: I still have to do this workaround to build+run a test in the IDE (e.g. runtime/common/.../JsonGenericTest)
From above: delegate build to Gradle:
(Settings -> Build, Execution, Deployment -> Build Tools -> Gradle ->(click on arrow)-> Runner -> tick Delegate IDE build/run actions to gradle).
My versions:
Kotlin plugin: v1.3.20-release-IJ2018.3-1 (Intellij)
library.version=0.10.0
kotlin.version=1.3.20
kotlin.version.snapshot=1.3-SNAPSHOT
plugin.version=1.3.20
plugin.version.snapshot=1.3-SNAPSHOT
Note: Plus I had to do a little bit of this along the way :-) -
https://stackoverflow.com/a/52200133/3853712
Hm, I can develop this project using IntelliJ IDEA without delegating to Gradle. Probably reimporting/deleting .idea folder could help you?
Followup: if I leave the "Delegate IDE build/run actions to gradle" ticked - somehow gradle doesn't see changes I make to modules in the IDE. For example - gradle doesn't even see purposefully induced syntax errors and underlying compiled debuggable code doesn't match what is shown in the debugger (mismatched line positions and changes to modules are not seen in variable lists for classes).
This suggests: the initial build of the project can be done through gradle, but after that the IDE has to do the building. Somehow changes made in the IDE are not transmitted to kt files such that gradle knows to rebuild them. I can't explain why the initial build has problems when initiated in the IDE on my system, but after a successful build, the IDE builds are required for consistent developement.
I'm still having trouble getting Intellij to find the annotations in a non-gradle project. I have nothing in my External Libraries section of the project pane that appears to include anything in kotlinx
@JacobAMason Unfortunately, to use compiler plugin, you need to either use Gradle or Maven.
Most helpful comment
Starting from Kotlin 1.3.11, build delegation is not required for Gradle.