It appears there have been changes in how ExtraPropertiesExtension works in the newest version of Android Studio/ the Google Maps template.
This is what the Project build.gradle file looks like in the version I have:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.0' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Searching the entire project for the string ext.kotlin_version
reveals no results, searching for buildscript
reveals two results using the Scope option but there are not related to the code presented in the “Ad-Hoc Gradle properties” section.
The work-around is to paste the code block that starts with buildscript
to the beginning of the specified file and add the closing curly brace directly after. The kotlin_version
part doesn’t seem to be needed, but the other two properties work just fine.