From 513fcc05ceee2d1fb1902f95eb69ed580fc8e37d Mon Sep 17 00:00:00 2001 From: Elshad Seyidmammadov Date: Wed, 21 Feb 2024 19:44:31 +0400 Subject: [PATCH] Upgrade Google Maps SDK Google Maps Platform has introduced a new renderer for Maps SDK for Android version 18.0, initially available on an opt-in basis. Starting from version 18.2, it will be the default renderer, with an option to specify the Legacy renderer (Renderer.LEGACY). Apps built with the Maps SDK for Android will be automatically updated to the latest renderer beginning March 4, 2024. The legacy renderer is scheduled for decommissioning on March 3, 2025. Update the Google Maps SDK dependency to the latest version for testing the application with the new renderer before the scheduled automatic update in March 2024, in order to limit risks of potential issues. Additionally, update the Gradle versions and build files to align with the configuration used by the Tabris Android platform. --- plugin.xml | 2 +- project/android/build.gradle | 13 ++++++++----- .../gradle/wrapper/gradle-wrapper.properties | 4 ++-- project/android/maps/build.gradle | 10 +++++----- .../com/eclipsesource/tabris/maps/MapMarker.kt | 4 ++-- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/plugin.xml b/plugin.xml index a28f48e..f343b82 100644 --- a/plugin.xml +++ b/plugin.xml @@ -48,7 +48,7 @@ - + diff --git a/project/android/build.gradle b/project/android/build.gradle index 70be08b..4979b89 100644 --- a/project/android/build.gradle +++ b/project/android/build.gradle @@ -1,11 +1,14 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext { + agp_version = '7.4.2' + kotlin_version = '1.7.20' + } repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath "com.android.tools.build:gradle:$agp_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -13,11 +16,11 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() maven { url 'https://jitpack.io' } maven { // provides tabris from directory repository - url System.getenv("TABRIS_ANDROID_PLATFORM") + "/bin/templates/project/m2repository" + url System.getenv("TABRIS_ANDROID_PLATFORM") + "/templates/project/m2repository" } } } diff --git a/project/android/gradle/wrapper/gradle-wrapper.properties b/project/android/gradle/wrapper/gradle-wrapper.properties index 7965e66..ab95e16 100644 --- a/project/android/gradle/wrapper/gradle-wrapper.properties +++ b/project/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Sep 09 17:26:04 CEST 2019 +#Wed Feb 21 12:55:56 AZT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/project/android/maps/build.gradle b/project/android/maps/build.gradle index c520659..4bffab5 100644 --- a/project/android/maps/build.gradle +++ b/project/android/maps/build.gradle @@ -2,18 +2,18 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' dependencies { - implementation 'com.eclipsesource.tabris.android:tabris:3.5.0' - implementation 'com.google.android.gms:play-services-maps:17.0.0' + implementation 'com.eclipsesource.tabris.android:tabris:3.9.0' + implementation 'com.google.android.gms:play-services-maps:18.2.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } android { - compileSdkVersion 29 + compileSdkVersion 33 defaultConfig { - minSdkVersion 21 - targetSdkVersion 29 + minSdkVersion 23 + targetSdkVersion 33 } lintOptions { diff --git a/src/android/com/eclipsesource/tabris/maps/MapMarker.kt b/src/android/com/eclipsesource/tabris/maps/MapMarker.kt index 1e5dafa..df51b4d 100644 --- a/src/android/com/eclipsesource/tabris/maps/MapMarker.kt +++ b/src/android/com/eclipsesource/tabris/maps/MapMarker.kt @@ -9,7 +9,7 @@ class MapMarker { var position: LatLng? = null set(value) { field = value - marker?.let { it.position = value } + marker?.position = value ?: return } var title: String? = null @@ -34,7 +34,7 @@ class MapMarker { set(value) { field = value value?.let { - it.position = position + it.position = position ?: return it.title = title it.setIcon(icon) it.snippet = snippet