diff --git a/.circleci/config.yml b/.circleci/config.yml index ca7a0dcdee8..c3713de3480 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,6 +94,8 @@ workflows: - assemble-instrumentation-test-internal - assemble-androidauto-test - assemble-app-mincompile + - assemble-qa-test-app + - assemble-android-auto-app - changelog-verification: filters: branches: @@ -409,6 +411,18 @@ commands: name: Assemble Navigation UI SDK (release) command: make assemble-ui-release + assemble-qa-test-app: + steps: + - run: + name: Assemble qa-test-app (both NDK 23 and NDK 27 variants) + command: make assemble-qa-test-app + + assemble-android-auto-app: + steps: + - run: + name: Assemble assemble-android-auto-app (both NDK 23 and NDK 27 variants) + command: make assemble-android-auto-app + assemble-old-deps-compat-release: parameters: additional_gradle_parameters: @@ -799,6 +813,22 @@ jobs: inject_token: true - write-workspace + assemble-qa-test-app: + executor: ndk-r22-latest-executor + resource_class: medium+ + steps: + - checkout + - restore-gradle-cache + - assemble-qa-test-app + + assemble-android-auto-app: + executor: ndk-r22-latest-executor + resource_class: medium+ + steps: + - checkout + - restore-gradle-cache + - assemble-android-auto-app + assemble-instrumentation-test-internal: executor: ndk-r22-latest-executor resource_class: medium+ diff --git a/LICENSE.md b/LICENSE.md index 5e81831a9c7..7b56b491174 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -3752,7 +3752,7 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== Mapbox Navigation uses portions of the Activity Kotlin Extensions (Kotlin extensions for 'activity' artifact). -URL: [https://developer.android.com/jetpack/androidx/releases/activity#1.2.3](https://developer.android.com/jetpack/androidx/releases/activity#1.2.3) +URL: [https://developer.android.com/jetpack/androidx/releases/activity#1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== @@ -3835,12 +3835,6 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== -Mapbox Navigation uses portions of the Android Lifecycle Process. -URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.4.0](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.4.0) -License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - -=========================================================================== - Mapbox Navigation uses portions of the Android Lifecycle Runtime. URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.4.0](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.4.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -3860,7 +3854,7 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== Mapbox Navigation uses portions of the Android Lifecycle ViewModel Kotlin Extensions (Kotlin extensions for 'viewmodel' artifact). -URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.3.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.3.1) +URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.3.0](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.3.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== @@ -3974,7 +3968,7 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== Mapbox Navigation uses portions of the Android Support Library fragment (The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later.). -URL: [https://developer.android.com/jetpack/androidx/releases/fragment#1.4.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.4.0) +URL: [https://developer.android.com/jetpack/androidx/releases/fragment#1.3.6](https://developer.android.com/jetpack/androidx/releases/fragment#1.3.6) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== @@ -4028,13 +4022,13 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== Mapbox Navigation uses portions of the Android WorkManager Kotlin Extensions. -URL: [https://developer.android.com/jetpack/androidx/releases/work#2.7.1](https://developer.android.com/jetpack/androidx/releases/work#2.7.1) +URL: [https://developer.android.com/jetpack/androidx/releases/work#2.7.0](https://developer.android.com/jetpack/androidx/releases/work#2.7.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== Mapbox Navigation uses portions of the Android WorkManager Runtime (Android WorkManager runtime library). -URL: [https://developer.android.com/jetpack/androidx/releases/work#2.7.1](https://developer.android.com/jetpack/androidx/releases/work#2.7.1) +URL: [https://developer.android.com/jetpack/androidx/releases/work#2.7.0](https://developer.android.com/jetpack/androidx/releases/work#2.7.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== @@ -4080,7 +4074,7 @@ License: [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== Mapbox Navigation uses portions of the Core Kotlin Extensions (Kotlin extensions for 'core' artifact). -URL: [https://developer.android.com/jetpack/androidx/releases/core#1.7.0](https://developer.android.com/jetpack/androidx/releases/core#1.7.0) +URL: [https://developer.android.com/jetpack/androidx/releases/core#1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== @@ -4092,7 +4086,7 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== Mapbox Navigation uses portions of the Fragment Kotlin Extensions (Kotlin extensions for 'fragment' artifact). -URL: [https://developer.android.com/jetpack/androidx/releases/fragment#1.4.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.4.0) +URL: [https://developer.android.com/jetpack/androidx/releases/fragment#1.3.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.3.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== @@ -4122,7 +4116,7 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== Mapbox Navigation uses portions of the Gson. -License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +License: [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== @@ -4221,7 +4215,7 @@ License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos) Mapbox Navigation uses portions of the Mapbox Android Core SDK. URL: [https://github.com/mapbox/mapbox-sdk](https://github.com/mapbox/mapbox-sdk) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== @@ -4275,13 +4269,13 @@ License: [BSD](https://opensource.org/licenses/BSD-2-Clause) Mapbox Navigation uses portions of the Mapbox Maps SDK. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the Mapbox Maps SDK Base. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== @@ -4394,91 +4388,91 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens Mapbox Navigation uses portions of the Telemetry for the Mapbox Maps SDK. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The android auto extension for the Mapbox Maps SDK for Android. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The annotation module for the Mapbox Maps SDK. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The attribution module for the Mapbox Maps SDK. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The camera animation module for the Mapbox Maps SDK for Android. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The compass module for the Mapbox Maps SDK. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The gestures module for the Mapbox Maps SDK for Android. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The location component module for the Mapbox Maps SDK for Android. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The logo module for the Mapbox Maps SDK for Android. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The map lifecycle module for the Mapbox Maps SDK for Android. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The map localization module for the Mapbox Maps SDK for Android. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The map overlay module for the Mapbox Maps SDK for Android. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The scalebar module for the Mapbox Maps SDK for Android. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The style extension for the Mapbox Maps SDK for Android. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== Mapbox Navigation uses portions of the The viewport module for the Mapbox Maps SDK. URL: [https://github.com/mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android) -License: [BSD](https://opensource.org/licenses/BSD-2-Clause) +License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos/) =========================================================================== diff --git a/Makefile b/Makefile index 9f7ae572228..055ed334383 100644 --- a/Makefile +++ b/Makefile @@ -176,12 +176,12 @@ ui-unit-tests-release-jacoco: .PHONY: publish-local publish-local: ./gradlew publishToMavenLocal - ./gradlew publishToMavenLocal -x libnavui-androidauto:mapboxSDKRegistryUpload -PndkMajor=27 + ./gradlew publishToMavenLocal -PndkMajor=27 .PHONY: upload-to-sdk-registry-snapshot upload-to-sdk-registry-snapshot: ./gradlew mapboxSDKRegistryUpload -Psnapshot=true - ./gradlew mapboxSDKRegistryUpload -x libnavui-androidauto:mapboxSDKRegistryUpload -Psnapshot=true -PndkMajor=27 + ./gradlew mapboxSDKRegistryUpload -Psnapshot=true -PndkMajor=27 .PHONY: upload-to-sdk-registry upload-to-sdk-registry: @@ -199,7 +199,8 @@ publish-to-sdk-registry: .PHONY: upload-to-sdk-registry-androidauto upload-to-sdk-registry-androidauto: - ./gradlew libnavui-androidauto:mapboxSDKRegistryUpload; + ./gradlew libnavui-androidauto:mapboxSDKRegistryUpload + ./gradlew libnavui-androidauto:mapboxSDKRegistryUpload -PndkMajor=27 .PHONY: publish-to-sdk-registry-androidauto publish-to-sdk-registry-androidauto: @@ -257,3 +258,13 @@ update-metalava: car: adb forward tcp:5277 tcp:5277 cd $(ANDROID_HOME)/extras/google/auto/ && ./desktop-head-unit + +.PHONY: assemble-qa-test-app +assemble-qa-test-app: + ./gradlew :qa-test-app:assembleDebug + ./gradlew :qa-test-app:assembleDebug -PndkMajor=27 + +.PHONY: assemble-android-auto-app +assemble-android-auto-app: + ./gradlew :android-auto-app:assembleDebug + ./gradlew :android-auto-app:assembleDebug -PndkMajor=27 diff --git a/android-auto-app/build.gradle b/android-auto-app/build.gradle index f74874a5aa8..4c534d859c6 100644 --- a/android-auto-app/build.gradle +++ b/android-auto-app/build.gradle @@ -68,12 +68,7 @@ android { dependencies { // Mapbox Navigation Android Auto SDK implementation project(':libnavui-androidauto') - - // This example is used for development so it may depend on unstable versions. - // Examples based on final versions can be found in the examples repository. - // https://github.com/mapbox/mapbox-navigation-android-examples - implementation("com.mapbox.navigation:ui-dropin:2.10.3") - implementation("com.mapbox.search:mapbox-search-android:1.0.0-rc.1") + implementation project(':libnavui-dropin') // Dependencies needed for this example. implementation dependenciesList.androidXCore @@ -84,4 +79,4 @@ dependencies { implementation dependenciesList.androidXFragment implementation dependenciesList.androidXLifecycleLivedata implementation dependenciesList.androidXLifecycleRuntime -} \ No newline at end of file +} diff --git a/changelog/unreleased/features/7922.md b/changelog/unreleased/features/7922.md new file mode 100644 index 00000000000..206af92a3ba --- /dev/null +++ b/changelog/unreleased/features/7922.md @@ -0,0 +1 @@ +- Added support for Android Auto module that supports Android 16 KB page-size devices. To consume SDK compatible with NDK 27 you need to add `-ndk27` suffix to the artifact name, for example, `com.mapbox.navigation:ui-androidauto` -> `com.mapbox.navigation:ui-androidauto-ndk27` diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 77b2bad58d8..ad8653a8349 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -35,8 +35,7 @@ ext { mapboxCrashMonitor : '2.0.0', mapboxAnnotationPlugin : '0.8.0', mapboxBaseAndroid : '0.8.0', - mapboxMapsAndroidAuto : '0.5.0', - mapboxSearchAndroidAuto : '1.0.0-rc.1', + mapboxMapsAndroidAuto : '0.6.1', androidXLifecycle : "${androidXLifecycleVersion}", androidXCoreVersion : '1.6.0', androidXArchCoreVersion : '2.1.0', @@ -88,8 +87,7 @@ ext { mapboxSdkRefreshModels : "com.mapbox.mapboxsdk:mapbox-sdk-directions-refresh-models:${version.mapboxSdkServices}", mapboxNavigator : "com.mapbox.navigator:mapbox-navigation-native$ndkVersionSuffix:${version.mapboxNavigator}", mapboxCommonNative : "com.mapbox.common:common$ndkVersionSuffix:${version.mapboxCommonNative}", - mapboxMapsAndroidAuto : "com.mapbox.extension:maps-androidauto:${version.mapboxMapsAndroidAuto}", - mapboxSearchAndroidAuto : "com.mapbox.search:mapbox-search-android:${version.mapboxSearchAndroidAuto}", + mapboxMapsAndroidAuto : "com.mapbox.extension:maps-androidauto$ndkVersionSuffix:${version.mapboxMapsAndroidAuto}", /** * explicitly define Mapbox OkHttp dependency so that we are sure it's in sync with the Common SDK version we define @@ -227,4 +225,14 @@ ext { mapboxNativeDownload : "com.mapbox.gradle.plugins:native-download:${pluginVersion.mapboxNativeDownload}", firebaseCrashlytics : "com.google.firebase:firebase-crashlytics-gradle:${pluginVersion.firebaseCrashlytics}" ] + + androidAutoVersions = [ + mapboxSearch : '1.5.0', + mapboxNavigation: '2.21.0' + ] + + androidAutoDependencies = [ + mapboxSearch : "com.mapbox.search:mapbox-search-android$ndkVersionSuffix:${androidAutoVersions.mapboxSearch}", + mapboxNavigation: "com.mapbox.navigation:android$ndkVersionSuffix:${androidAutoVersions.mapboxNavigation}" + ] } diff --git a/libnavui-androidauto/build.gradle b/libnavui-androidauto/build.gradle index 928e26f6d67..945c9280c5b 100644 --- a/libnavui-androidauto/build.gradle +++ b/libnavui-androidauto/build.gradle @@ -38,13 +38,10 @@ dependencies { // Jetpack car library. api(dependenciesList.mapboxMapsAndroidAuto) - // This defines the minimum version of Navigation which is included in this SDK. To upgrade the - // Navigation versions, you can specify a newer version in your downstream build.gradle. - api("com.mapbox.navigation:android:2.10.3") - - // Search is currently in beta so it is not included in this SDK. The functionality of search - // is included behind this library's api. - implementation(dependenciesList.mapboxSearchAndroidAuto) + // This defines the minimum version of Navigation and Search that are included in this SDK. + // To upgrade the versions, you can specify a newer versions in your downstream build.gradle. + api(androidAutoDependencies.mapboxNavigation) + implementation(androidAutoDependencies.mapboxSearch) implementation(dependenciesList.androidXAppCompat) implementation(dependenciesList.coroutinesCore) diff --git a/libnavui-androidauto/src/main/java/com/mapbox/androidauto/feedback/ui/CarFeedbackIconDownloader.kt b/libnavui-androidauto/src/main/java/com/mapbox/androidauto/feedback/ui/CarFeedbackIconDownloader.kt index 8a1b565a7ad..9fa8300205d 100644 --- a/libnavui-androidauto/src/main/java/com/mapbox/androidauto/feedback/ui/CarFeedbackIconDownloader.kt +++ b/libnavui-androidauto/src/main/java/com/mapbox/androidauto/feedback/ui/CarFeedbackIconDownloader.kt @@ -5,12 +5,12 @@ import android.net.Uri import androidx.car.app.Screen import androidx.car.app.model.CarIcon import androidx.core.graphics.drawable.IconCompat -import androidx.core.graphics.drawable.toBitmap import androidx.lifecycle.lifecycleScope import com.bumptech.glide.Glide import com.bumptech.glide.RequestManager import com.bumptech.glide.request.target.CustomTarget import com.bumptech.glide.request.transition.Transition +import com.mapbox.navigation.utils.internal.android.toBitmap import kotlinx.coroutines.launch import kotlinx.coroutines.suspendCancellableCoroutine import kotlinx.coroutines.withTimeoutOrNull diff --git a/libnavui-androidauto/src/main/java/com/mapbox/androidauto/internal/search/CarPlaceSearchImpl.kt b/libnavui-androidauto/src/main/java/com/mapbox/androidauto/internal/search/CarPlaceSearchImpl.kt index bdd8b947b32..8bc5d67c2e3 100644 --- a/libnavui-androidauto/src/main/java/com/mapbox/androidauto/internal/search/CarPlaceSearchImpl.kt +++ b/libnavui-androidauto/src/main/java/com/mapbox/androidauto/internal/search/CarPlaceSearchImpl.kt @@ -86,7 +86,7 @@ class CarPlaceSearchImpl( return suspendCancellableCoroutine { continuation -> val selectionCallback = object : SearchSelectionCallback { - override fun onCategoryResult( + override fun onResults( suggestion: SearchSuggestion, results: List, responseInfo: ResponseInfo diff --git a/libnavui-androidauto/src/test/java/com/mapbox/androidauto/placeslistonmap/PlacesListOnMapLayerUtilTest.kt b/libnavui-androidauto/src/test/java/com/mapbox/androidauto/placeslistonmap/PlacesListOnMapLayerUtilTest.kt index 916f3fc260d..ab6c3079c59 100644 --- a/libnavui-androidauto/src/test/java/com/mapbox/androidauto/placeslistonmap/PlacesListOnMapLayerUtilTest.kt +++ b/libnavui-androidauto/src/test/java/com/mapbox/androidauto/placeslistonmap/PlacesListOnMapLayerUtilTest.kt @@ -58,7 +58,6 @@ class PlacesListOnMapLayerUtilTest : MapboxRobolectricTestRunner() { fun initializeFavoritesLayer() { mockkStatic("com.mapbox.maps.extension.style.layers.LayerUtils") mockkObject(GeoJsonSource) - every { GeoJsonSource.directSetterEnabled() } returns true val style = mockk