Reputation: 14004
I've just started a new Jetpack Compose project using the "Empty Compose Activity" Android Studio (2020.3.1 Canary 14) template, but I'm getting the following warning in my build.gradle.kts (:app)
file:
'kotlinCompilerVersion: String?' is deprecated.
The deprecation does not provide any information about what to use instead. Should I simply remove this option or do something else?
Upvotes: 34
Views: 14796
Reputation: 365048
kotlinCompilerVersion
can be safely removed.
Compose now uses the kotlin compiler defined in your buildscript
.
buildscript {
ext.kotlin_version = '1.5.21'
//....
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
If you are using the plugins
block (in settings.gradle
or build.gradle
)
pluginManagement {
//..
plugins {
id 'org.jetbrains.kotlin.android' version '1.5.21'
}
}
Upvotes: 64