How to determine Kotlin version for old Gradle version?

1.1k views Asked by At

I have an existing project using Gradle 5.6.3, which is currently building Java-only Android. I'd like to add a library in Kotlin.

I had IntelliJ generate a library module, which gave me the following configuration:

plugins {
    id 'org.jetbrains.kotlin.android'
}

and in my parent project

buildscript {
    dependencies {
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30'
    }
}

However, when I run this, it fails, saying The current Gradle version 5.6.3 is not compatible with the Kotlin Gradle plugin. Please use Gradle 6.1.1 or newer, or the previous version of the Kotlin plugin.

Because of reasons, upgrading Gradle is not an option for the project right now. So I want to satisfy Gradle by using "the previous version".

I already looked at the compatibility matrix, but that only says that Gradle is tested with Kotlin 1.3.72 through 1.6.0., which isn't helpful.

So, which version of the kotlin-gradle-plugin do I need if I want to stay on Gradle 5.6.3?

0

There are 0 answers