I am migrating to kotlin DSL
And this is my project level build gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.2.2' apply false
id 'com.android.library' version '7.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I updated the file extension to -build.gradle.kts
And the file content to
plugins {
id ("com.android.application" version "7.2.2" apply false)
id ("com.android.library" version "7.2.2" apply false)
id ("org.jetbrains.kotlin.android" version "${Versions.kotlin}" apply false)
}
tasks.register("clean",Delete::class){
delete(rootProject.buildDir)
}
I am getting this error
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public infix fun PluginDependencySpec.version(version: String?): PluginDependencySpec defined in org.gradle.kotlin.dsl
public infix fun PluginDependencySpec.version(version: Provider<String>): PluginDependencySpec defined in org.gradle.kotlin.dsl