Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
8 changes: 1 addition & 7 deletions android-auto-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ 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")

// Dependencies needed for this example.
implementation dependenciesList.androidXCore
implementation dependenciesList.materialDesign
Expand All @@ -84,4 +78,4 @@ dependencies {
implementation dependenciesList.androidXFragment
implementation dependenciesList.androidXLifecycleLivedata
implementation dependenciesList.androidXLifecycleRuntime
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ android.enableJetifier=false
# https://youtrack.jetbrains.com/issue/KT-46822
systemProp.kotlin.daemon.jvm.options=-Xss8m

ndkMajor=27

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand Down
12 changes: 10 additions & 2 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ ext {
mapboxAnnotationPlugin : '0.8.0',
mapboxBaseAndroid : '0.8.0',
mapboxMapsAndroidAuto : '0.5.0',
mapboxSearchAndroidAuto : '1.0.0-rc.1',
androidXLifecycle : "${androidXLifecycleVersion}",
androidXCoreVersion : '1.6.0',
androidXArchCoreVersion : '2.1.0',
Expand Down Expand Up @@ -89,7 +88,6 @@ ext {
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}",

/**
* explicitly define Mapbox OkHttp dependency so that we are sure it's in sync with the Common SDK version we define
Expand Down Expand Up @@ -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}"
]
}
11 changes: 4 additions & 7 deletions libnavui-androidauto/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class CarPlaceSearchImpl(

return suspendCancellableCoroutine { continuation ->
val selectionCallback = object : SearchSelectionCallback {
override fun onCategoryResult(
override fun onResults(
suggestion: SearchSuggestion,
results: List<SearchResult>,
responseInfo: ResponseInfo
Expand Down