From 5352000f3aef6b0f08df45abc75653eb99939dc3 Mon Sep 17 00:00:00 2001 From: Dale Hawkins <107309+dkhawk@users.noreply.github.com> Date: Tue, 14 Jul 2026 09:30:06 -0600 Subject: [PATCH] build(deps): update dependencies across codelab-maps-platform-101-android-kotlin --- solution-ktx/app/build.gradle | 34 ++++++++++++------- .../codelabs/buildyourfirstmap/place/Place.kt | 3 ++ solution-ktx/build.gradle | 4 +-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- solution/app/build.gradle | 28 +++++++++------ .../codelabs/buildyourfirstmap/place/Place.kt | 3 ++ solution/build.gradle | 4 +-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- starter/app/build.gradle | 26 +++++++++----- starter/build.gradle | 4 +-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- 11 files changed, 71 insertions(+), 41 deletions(-) diff --git a/solution-ktx/app/build.gradle b/solution-ktx/app/build.gradle index e5c5c6d..35a0cb7 100644 --- a/solution-ktx/app/build.gradle +++ b/solution-ktx/app/build.gradle @@ -1,20 +1,28 @@ plugins { id 'com.android.application' id 'kotlin-android' - id 'kotlin-android-extensions' // Add secrets-gradle-plugin here id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' } android { - compileSdk 32 - buildToolsVersion "29.0.3" + namespace = "com.google.codelabs.buildyourfirstmap" + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } + + compileSdk 36 + defaultConfig { applicationId "com.google.codelabs.buildyourfirstmap" - minSdk 21 - targetSdk 32 + minSdk 24 + targetSdk 36 versionCode 1 versionName "1.0" @@ -35,24 +43,24 @@ dependencies { // [START_EXCLUDE] implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'com.google.code.gson:gson:2.8.6' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'androidx.core:core-ktx:1.18.0' + implementation 'com.google.code.gson:gson:2.14.0' testImplementation 'junit:junit:4.13.2' // Dependency to include Maps SDK for Android - implementation 'com.google.android.gms:play-services-maps:18.0.2' - implementation 'com.google.maps.android:android-maps-utils:2.2.0' + implementation 'com.google.android.gms:play-services-maps:20.0.0' + implementation 'com.google.maps.android:android-maps-utils:4.5.2' // [END_EXCLUDE] // Maps SDK for Android KTX Library - implementation 'com.google.maps.android:maps-ktx:3.3.0' + implementation 'com.google.maps.android:maps-ktx:6.0.1' // Maps SDK for Android Utility Library KTX Library - implementation 'com.google.maps.android:maps-utils-ktx:3.0.0' + implementation 'com.google.maps.android:maps-utils-ktx:6.0.1' // Lifecycle Runtime KTX Library - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.10.0' } // [END maps_android_add_map_codelab_ktx_dependency] diff --git a/solution-ktx/app/src/main/java/com/google/codelabs/buildyourfirstmap/place/Place.kt b/solution-ktx/app/src/main/java/com/google/codelabs/buildyourfirstmap/place/Place.kt index 416d9fe..594c4b4 100644 --- a/solution-ktx/app/src/main/java/com/google/codelabs/buildyourfirstmap/place/Place.kt +++ b/solution-ktx/app/src/main/java/com/google/codelabs/buildyourfirstmap/place/Place.kt @@ -31,4 +31,7 @@ data class Place( override fun getSnippet(): String = address + + override fun getZIndex(): Float? = + 0f } diff --git a/solution-ktx/build.gradle b/solution-ktx/build.gradle index 63726ab..8f86379 100644 --- a/solution-ktx/build.gradle +++ b/solution-ktx/build.gradle @@ -1,13 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.5.30' + ext.kotlin_version = '2.2.0' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.4' + classpath 'com.android.tools.build:gradle:8.13.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1" } diff --git a/solution-ktx/gradle/wrapper/gradle-wrapper.properties b/solution-ktx/gradle/wrapper/gradle-wrapper.properties index a60a9fe..e9a8bbb 100644 --- a/solution-ktx/gradle/wrapper/gradle-wrapper.properties +++ b/solution-ktx/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip diff --git a/solution/app/build.gradle b/solution/app/build.gradle index 3adf72b..194c23b 100644 --- a/solution/app/build.gradle +++ b/solution/app/build.gradle @@ -1,20 +1,28 @@ plugins { id 'com.android.application' id 'kotlin-android' - id 'kotlin-android-extensions' // Add secrets-gradle-plugin here id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' } android { - compileSdk 32 - buildToolsVersion "29.0.3" + namespace = "com.google.codelabs.buildyourfirstmap" + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } + + compileSdk 36 + defaultConfig { applicationId "com.google.codelabs.buildyourfirstmap" - minSdk 21 - targetSdk 32 + minSdk 24 + targetSdk 36 versionCode 1 versionName "1.0" @@ -33,13 +41,13 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'com.google.code.gson:gson:2.8.6' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'androidx.core:core-ktx:1.18.0' + implementation 'com.google.code.gson:gson:2.14.0' // Dependency to include Maps SDK for Android - implementation 'com.google.android.gms:play-services-maps:18.0.2' - implementation 'com.google.maps.android:android-maps-utils:2.2.0' + implementation 'com.google.android.gms:play-services-maps:20.0.0' + implementation 'com.google.maps.android:android-maps-utils:4.5.2' testImplementation 'junit:junit:4.13.2' } diff --git a/solution/app/src/main/java/com/google/codelabs/buildyourfirstmap/place/Place.kt b/solution/app/src/main/java/com/google/codelabs/buildyourfirstmap/place/Place.kt index 416d9fe..594c4b4 100644 --- a/solution/app/src/main/java/com/google/codelabs/buildyourfirstmap/place/Place.kt +++ b/solution/app/src/main/java/com/google/codelabs/buildyourfirstmap/place/Place.kt @@ -31,4 +31,7 @@ data class Place( override fun getSnippet(): String = address + + override fun getZIndex(): Float? = + 0f } diff --git a/solution/build.gradle b/solution/build.gradle index 63726ab..8f86379 100644 --- a/solution/build.gradle +++ b/solution/build.gradle @@ -1,13 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.5.30' + ext.kotlin_version = '2.2.0' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.4' + classpath 'com.android.tools.build:gradle:8.13.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1" } diff --git a/solution/gradle/wrapper/gradle-wrapper.properties b/solution/gradle/wrapper/gradle-wrapper.properties index 6cb4610..4ce1fd7 100644 --- a/solution/gradle/wrapper/gradle-wrapper.properties +++ b/solution/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip \ No newline at end of file +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip \ No newline at end of file diff --git a/starter/app/build.gradle b/starter/app/build.gradle index 3d4d2e1..3a40e48 100644 --- a/starter/app/build.gradle +++ b/starter/app/build.gradle @@ -1,19 +1,27 @@ plugins { id 'com.android.application' id 'kotlin-android' - id 'kotlin-android-extensions' // Add secrets-gradle-plugin here } android { - compileSdk 32 - buildToolsVersion "29.0.3" + namespace = "com.google.codelabs.buildyourfirstmap" + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } + + compileSdk 36 + defaultConfig { applicationId "com.google.codelabs.buildyourfirstmap" - minSdk 21 - targetSdk 32 + minSdk 24 + targetSdk 36 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -31,12 +39,12 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'com.google.code.gson:gson:2.8.6' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'androidx.core:core-ktx:1.18.0' + implementation 'com.google.code.gson:gson:2.14.0' // Dependency to include Maps SDK for Android - implementation 'com.google.android.gms:play-services-maps:18.0.2' + implementation 'com.google.android.gms:play-services-maps:20.0.0' testImplementation 'junit:junit:4.13.2' } diff --git a/starter/build.gradle b/starter/build.gradle index 3ff7239..79f3302 100644 --- a/starter/build.gradle +++ b/starter/build.gradle @@ -1,13 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.5.30' + ext.kotlin_version = '2.2.0' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.4' + classpath 'com.android.tools.build:gradle:8.13.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/starter/gradle/wrapper/gradle-wrapper.properties b/starter/gradle/wrapper/gradle-wrapper.properties index db36e34..7b99d03 100644 --- a/starter/gradle/wrapper/gradle-wrapper.properties +++ b/starter/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip \ No newline at end of file +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip \ No newline at end of file