When I use this code in build.gradle.kts(:app), it gives this error: Unresolved reference: def
def apikeyPropertiesFile = rootProject.file("apikey.properties")
def apikeyPro = new Properties()
apikeyPro.load(new FileInputStream(apikeyPropertiesFile))
How can I use “def” in gradle?