What's the difference between 「Kotlin Plugin Version」 and 「Kotlin Gradle Plugin Version」?
・Kotlin Plugin Version
The version of KotlinPlugin that can be found at [File]->[Settings]->[Plugins]
・Kotlin Gradle Plugin Version
The version of KotlinGradlePlugin described in the project's build.gradle
Should these two values be the same? If anyone can tell me, could you please let me know?
CodePudding user response:
The Kotlin Plugin you mentioned first is an IDE plugin - it helps your IDE understand the Kotlin language, provide intentions, syntax highlighting, compile errors in the editor etc.
The Kotlin Gradle Plugin is a plugin meant for the Gradle build tool. This is the actual thing that compiles your code and runs the tests, and ultimately this is the most important.
You don't have to have the same version for both, but you should probably make sure the IDE plugin has a version more recent or equal to the Gradle plugin. It's important to select the version for the Kotlin Gradle Plugin based on what Kotlin version you want to use in your project. For the IDE plugin, the latest stable version is usually best. Normally, the latest Kotlin IDE plugin should understand that your Gradle configuration wants to use a lower version of Kotlin, and thus act accordingly.