I am creating some constants in my build gradle file and I am getting the following error while building
A problem occurred evaluating root project 'App'.
Exception evaluating property 'gradle' for java.util.ArrayList, Reason: groovy.lang.MissingPropertyException: No such property: gradle for class: java.lang.String
This is my top level gradle where I am making th change
buildscript {
ext{
compileSdkVersion = 31
targetSdkVersion = 31
minSdkVersion = 21
versions=[
kotlin='1.6.10',
gradle='4.2.1'
]
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:${versions.gradle}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
CodePudding user response:
It was syntax Issue caused due to the use of =
versions = [
kotlin : '1.6.10',
gradlePlugin : '4.2.1'
]