diff --git a/snippets/app/build.gradle b/snippets/app/build.gradle index 8c81dff3..8038d894 100644 --- a/snippets/app/build.gradle +++ b/snippets/app/build.gradle @@ -54,7 +54,7 @@ android { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.10' implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.4.1' implementation "androidx.compose.foundation:foundation:1.2.0-alpha05" diff --git a/snippets/build.gradle b/snippets/build.gradle index 3482a1a7..d54a2fad 100644 --- a/snippets/build.gradle +++ b/snippets/build.gradle @@ -1,30 +1,7 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. -// [START maps_android_secrets_gradle_plugin_classpath] -buildscript { - // [START_EXCLUDE silent] - ext.kotlin_version = "1.6.10" - repositories { - google() - mavenCentral() - } - // [END_EXCLUDE] - dependencies { - // [START_EXCLUDE] - classpath "com.android.tools.build:gradle:7.1.2" - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - // [END_EXCLUDE] - classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1" - } -} -// [END maps_android_secrets_gradle_plugin_classpath] - -allprojects { - repositories { - google() - mavenCentral() - } +plugins { + id 'com.android.application' version '7.1.2' apply false + id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.1' apply false + id 'org.jetbrains.kotlin.android' version '1.6.10' apply false } task clean(type: Delete) { diff --git a/snippets/settings.gradle b/snippets/settings.gradle index ff5b71c5..a3980607 100644 --- a/snippets/settings.gradle +++ b/snippets/settings.gradle @@ -1,2 +1,20 @@ +// [START maps_android_settings_plugin_management] +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} +// [END maps_android_settings_plugin_management] +// [START maps_android_settings_dependency_resolution_management] +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +// [END maps_android_settings_dependency_resolution_management] include ':app' -rootProject.name = "Snippets App" \ No newline at end of file +rootProject.name = "Snippets App"