Skip to content

Commit d2971cf

Browse files
Update dependencies. SDK version bump (#157)
1 parent ac63d58 commit d2971cf

8 files changed

+116
-11
lines changed

CHANGELOG.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# Changelog for the Mapbox Search SDK for Android
22

3-
## 1.0.0-rc.6-SNAPSHOT
3+
## 1.0.0-rc.6
44

55
### Breaking changes
66
- [CORE] `SearchSuggestionType.IndexableRecordItem.type` field has been replaced with `record` field which provides `IndexableRecord` instance.
77

88
### Bug fixes
99
- [CORE] Now search suggestions and search results that are matched with `IndexableRecord`s provide data from the backend which is likely to be up-to-date than data from `IndexableRecord`. Original `IndexableRecord` instance can be obtained from `SearchSuggestionType.IndexableRecordItem.record` and `SearchResult.indexableRecord`.
10+
- [ALL] Fixed an issue where SBS backend doesn't always capitilized street names for POI results.
11+
- [ALL] Fixed an issue where some POI results from SBS backend were missing "Ave/St/Avenue/Street" words in street names.
1012

1113
### Mapbox dependencies
12-
- Search Native SDK `0.69.0`
13-
- Common SDK `23.6.0-rc.1`
14+
- Search Native SDK `0.70.0`
15+
- Common SDK `23.6.0`
1416
- Kotlin `1.5.31`
1517

1618

MapboxSearch/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ android.enableJetifier=false
2121
kotlin.code.style=official
2222

2323
# SDK version attributes
24-
VERSION_NAME=1.0.0-rc.6-SNAPSHOT
24+
VERSION_NAME=1.0.0-rc.6
2525

2626
# Artifact attributes
2727
mapboxArtifactUserOrg=mapbox

MapboxSearch/gradle/versions.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ ext {
4141

4242
pitest_version = '1.6.7'
4343

44-
mapbox_maps_version = '10.14.0-rc.1'
45-
common_sdk_version = '23.6.0-rc.1'
44+
mapbox_maps_version = '10.14.0'
45+
common_sdk_version = '23.6.0'
4646
mapbox_base_version = '0.8.0'
4747

48-
search_native_version = '0.69.0'
48+
search_native_version = '0.70.0'
4949

5050
detekt_version = '1.19.0'
5151

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"suggestions": [
3+
{
4+
"feature_name": "667 Madison",
5+
"matching_name": "667 Madison",
6+
"highlighted_name": "667 Madison,New York City,madison ave,New York",
7+
"description": "667 Madison Ave, New York City, New York 10065, United States of America",
8+
"result_type": [
9+
"poi"
10+
],
11+
"language": "en",
12+
"action": {
13+
"endpoint": "retrieve",
14+
"method": "POST",
15+
"body": {
16+
"id": "0pDj_Rew9CLUO8R2UnOKPup2ZJZuWwQpNNTqyTGmGB1WTC30P0_sht2U3w7UOiTI4H1681Oq4MPdoT93OZOI5q7nwmuBm8TYKZuSCGybp2VH0rXMM8k7hBGxgwLggoQGzRh4qOQRnKM2EtcbxLM-tb5aQeC_NiGWX5aa_8ZWcRcFwxGhQ-8GxBuY-f2EzBOVUu1ACpUZIzmiaft27CZiaxIFEuut89nTyk_k_yFCcVhF5xFodu5YHIWFhbmHbYolnATIjVhguYVUqXlDpGroxY3PLhwtGhABn_FV59Hw97vWQz2tXLjJsZ_m94m9bslREzZovbRVWTtt17IGlQZUbQME8ft3c98eLGxrh50Z8YNG-7aKr4_pJ9llCSuPkivNLZKVsbbdCz1t5nM_WPn8f8Xbb9wX3KnM4CBMWM2bvo13zcujlRj1xigzqHTs2JlqrVaVbK-J9IKo-1qk9qX1rBvzvjUnxVVoI0ppb4xwoR71k0Rqaet2UJ8iU19jizxgopAB7sKQVjEYpVs_PMFNr-TMNewjYFVDMUeprLEVIufYatvRboeoeGtsuYsI5XJ3meV5fZsOMX4IeIcLDNG-Fh5cVYlFvw-VojTfXEhPyiZlIjSy2ftASYd5IJ7JrDjrw0EC-GwzwfswFj7ZBGu1o40N7_kubT2KxN6kdzDuA8oHucrxBPmr5jqONJOUAIbNPoT9U85uUHMSqA_3__QH5BEh9O49cUYujsfMWxGOX-zkCM44iXtXQHbEDqtQDiVJrw_7YPK5ArCoStFUvlgwYBWFpooENF2BNKVNJzFAgN8HmrOR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7Oz1DzIBASMzZfj0azUIxcBpc9X1HjJnQ_e2VxNkEAN3zBaxF7Vr5z8ULCNMFEVEN4TqO7BVrajELWEmYJzPw="
17+
},
18+
"multi_retrievable": true
19+
},
20+
"coordinates": "-73.970262,40.764425",
21+
"routable_points": [
22+
{
23+
"name": "POI",
24+
"coordinates": [
25+
-73.97061240745133,
26+
40.764688323942714
27+
]
28+
}
29+
],
30+
"maki": "marker",
31+
"category": [
32+
"office"
33+
],
34+
"category_ids": [
35+
"office"
36+
],
37+
"internal_id": "Y2aAgIL8TAA=.42eAgMSCTN2C_Ezd4tSisszkVAA=.U2aAgLT80qLiwtLEolQ9k8SUVHMjA9M0SzOTRFMjg9RUc1Mjw1RjAA==",
38+
"external_ids": {
39+
"foursquare": "4ade7205f964a520ee7521e3",
40+
"federated": "poi.b064d09463365d08f3d3ec6b54e1e9673e157cf65b0dbb4fb7c38c6343d404ff",
41+
"mbx_poi": "b064d09463365d08f3d3ec6b54e1e9673e157cf65b0dbb4fb7c38c6343d404ff"
42+
},
43+
"mapbox_id": "CkIKQGIwNjRkMDk0NjMzNjVkMDhmM2QzZWM2YjU0ZTFlOTY3M2UxNTdjZjY1YjBkYmI0ZmI3YzM4YzYzNDNkNDA0ZmY=",
44+
"context": [
45+
{
46+
"layer": "address",
47+
"localized_layer": "address",
48+
"name": "667 Madison Ave"
49+
},
50+
{
51+
"layer": "street",
52+
"localized_layer": "street",
53+
"name": "madison ave"
54+
},
55+
{
56+
"layer": "postcode",
57+
"localized_layer": "postcode",
58+
"name": "10065"
59+
},
60+
{
61+
"layer": "place",
62+
"localized_layer": "place",
63+
"name": "New York City"
64+
},
65+
{
66+
"layer": "region",
67+
"localized_layer": "region",
68+
"name": "New York"
69+
},
70+
{
71+
"layer": "country",
72+
"localized_layer": "country",
73+
"name": "United States of America"
74+
}
75+
],
76+
"metadata": {
77+
"iso_3166_1": "US",
78+
"iso_3166_2": "US-NY"
79+
}
80+
}
81+
],
82+
"attribution": "© 2023 Mapbox and its suppliers. All rights reserved. Use of this data is subject to the Mapbox Terms of Service. (https://www.mapbox.com/about/maps/)",
83+
"version": "141:f9a22b62836e23acbb9bf1fc5a7b63c46cd301ce",
84+
"response_uuid": "836c2755-59c5-4798-8493-4fe37edd2b62"
85+
}

MapboxSearch/sdk/src/androidTest/java/com/mapbox/search/CategorySearchIntegrationTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ internal class CategorySearchIntegrationTest : BaseTest() {
196196
place = "Mountain View",
197197
postcode = "94041",
198198
region = "California",
199-
street = "castro st"
199+
street = "Castro St"
200200
)
201201
),
202202
fullAddress = "750 Castro St, Mountain View, California 94041, United States of America",

MapboxSearch/sdk/src/androidTest/java/com/mapbox/search/LocalDataProvidersIntegrationTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ internal class LocalDataProvidersIntegrationTest : BaseTest() {
125125
place = "San Jose",
126126
postcode = "95117",
127127
region = "California",
128-
street = "stevens creek blvd",
128+
street = "Stevens Creek Blvd",
129129
neighborhood = "Valley Fair",
130130
houseNumber = "3249",
131131
country = "United States of America"

MapboxSearch/sdk/src/androidTest/java/com/mapbox/search/ReverseGeocodingSearchIntegrationTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ internal class ReverseGeocodingSearchIntegrationTest : BaseTest() {
161161
neighborhood = "Gros-Caillou",
162162
place = "Paris",
163163
postcode = "75007",
164-
street = "avenue anatole france"
164+
street = "Avenue Anatole France"
165165
)
166166
),
167167
fullAddress = "5 Avenue Anatole France, 75007 Paris, France",

MapboxSearch/sdk/src/androidTest/java/com/mapbox/search/SearchEngineIntegrationTest.kt

+19-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ internal class SearchEngineIntegrationTest : BaseTest() {
517517
place = "San Francisco",
518518
neighborhood = "Downtown",
519519
postcode = "94102",
520-
street = "van ness",
520+
street = "Van Ness",
521521
houseNumber = "150"
522522
),
523523
searchResultType = SearchResultType.ADDRESS,
@@ -1151,6 +1151,24 @@ internal class SearchEngineIntegrationTest : BaseTest() {
11511151
assertEquals("667 Madison Ave, New York City, New York 10065, United States of America", suggestion.fullAddress)
11521152
}
11531153

1154+
@Test
1155+
fun testSbsBackendDataCorrections() {
1156+
/**
1157+
* For some results backend sends incorrectly formatted fields. Search SDK tries to patch such data:
1158+
* (SSDK-276) street: madison ave -> Madison Ave
1159+
* (SSDK-277) name: 667 Madison -> 667 Madison Ave
1160+
*/
1161+
mockServer.enqueue(createSuccessfulResponse("sbs_responses/suggestions-data-formatting-corrections-test.json"))
1162+
1163+
val suggestionsResponse = searchEngine.searchBlocking(TEST_QUERY, SearchOptions())
1164+
1165+
val suggestions = suggestionsResponse.requireSuggestions()
1166+
val suggestion = suggestions.first()
1167+
1168+
assertEquals("667 Madison Ave", suggestion.name)
1169+
assertEquals("Madison Ave", suggestion.address?.street)
1170+
}
1171+
11541172
@Test
11551173
fun testGeocodingCzechAddressFormatting() {
11561174
searchEngine = SearchEngine.createSearchEngine(ApiType.GEOCODING, searchEngineSettings)

0 commit comments

Comments
 (0)