Skip to content

Commit

Permalink
#4 - Removal of Mapbox SDK except utility libraries (#8)
Browse files Browse the repository at this point in the history
* Removed mapbox specific cfn template

I removed mapbox specific cfn template that I assume does the following
- Manages permission to access to mapbox S3 buckets for production and staging
build artifacts.

Build: Gradle build is still failing. No build test was done.

* Removed "Error Prone" integration

I removed Google Error Prone integration for the time being.
This integration is outdated and is breaking builds due to Java
compatibility mismatch.

I created a new issue #6
to continue this particular effort there.

test: Gradle Build is still failing due to checkstyle.

* [#4] Building with gradle enabled

Finally maanged to build with gradle. Clearly the checkstyle rules
are not consistently propagated to all sub-projects. But that is not
what I am tackling right now.

I added separate checkstyle directive to sub projects. The checkstyle
fix will be done later in this work in progress.

test: ./gradlew build

* Removed Sample project

In this changeset I removed the sample project that demonsrated Mapbox's API samples.

* [#4] Removed optimization, matrix, matching, geocoding, directions, and cli

I removed optimization, matrix, matching, geocoding, directions, and cli
project in one go. These are Mapbox API wrappers that are not required for
MapLibre Android.

test: gradlew build

* Remove route-tiles and isochrones

* Removed tile-query, and speech

* [#4] Removed services-core and services-staticmap

Following the suite of removing Mapbox SDK from here. Removed services-core
and services-staticmap from here too. Ideally the only two projects that should
remain are
1. services-geojson
2. services-turf

None of these rely on a Mapbox API interface. Both of these are utility libraries.

build: ./gradlew build

* [#4] Removed services-core from repo

This repository is publishing every library under org.maplibre.gl namespace.
Every one of the package is named MapLibre Android SDK. I removed the core
services package finally since this is not required anymore.

test: gradlew build

* [#4] Turning off checkstyle to pass the build

* [#4] Cleaning up unnecessary dependencies

Cleaned up unnecessary dependencies. I removed sonatype and artifactory
publishing. I still intend to publish to maven but I do not think that
has anything to do with these. If required, I will bring them back.

test: ./gradlew clean build

* [#4] Build logic cleanup in progress

* [#4 #7] Upgraded Gradle version to 7.5.1

Upgraded gradle version to 7.5.1. I updated the deprecated archive
classifier properties. I also updated test depdencies to testImplementation
based on new documentation.

test: ./gradlew build

* [#4] Documentation update to reflect current status, more to follow

Co-authored-by: Swagata Prateek <[email protected]>
  • Loading branch information
thehoneymad and Swagata Prateek authored Nov 15, 2022
1 parent 8b4d1d6 commit b326cfd
Show file tree
Hide file tree
Showing 316 changed files with 189 additions and 61,539 deletions.
113 changes: 0 additions & 113 deletions .circleci/config.yml

This file was deleted.

32 changes: 0 additions & 32 deletions INSTALL.md

This file was deleted.

166 changes: 0 additions & 166 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# Used for Map Matching
MAP_MATCHING_COORDINATES = 13.418946862220764,52.50055852688439;13.419011235237122,52.50113000479732;13.419756889343262,52.50171780290061;13.419885635375975,52.50237416816131;13.420631289482117,52.50294888790448

# Used for directions
DIRECTIONS_POST_COORDINATES = 2.344003915786743,48.85805170891599;2.346750497817993,48.85727523615161;2.348681688308716,48.85936462637049;2.349550724029541,48.86084691113991;2.349550724029541,48.8608892614883;2.349625825881958,48.86102337068847;2.34982967376709,48.86125629633996

build-config:
./gradlew compileBuildConfig

checkstyle:
./gradlew checkstyleMain

Expand All @@ -33,162 +24,5 @@ javadoc:
publish:
./gradlew publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository

directions-matrix-fixtures:
# request a symmetric 1x3 matrix for pedestrians
curl "https://api.mapbox.com/directions-matrix/v1/mapbox/walking/-122.42,37.78;-122.45,37.91;-122.48,37.73?sources=1&annotations=distance,duration&approaches=curb;curb;curb&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-matrix/src/test/resources/directions_matrix_1x3.json

# request a symmetric 3x3 matrix for cars
curl "https://api.mapbox.com/directions-matrix/v1/mapbox/driving/-122.42,37.78;-122.45,37.91;-122.48,37.73?access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-matrix/src/test/resources/directions_matrix_3x3.json

# request an asymmetric 2x3 matrix for bicycles
curl "https://api.mapbox.com/directions-matrix/v1/mapbox/cycling/-122.42,37.78;-122.45,37.91;-122.48,37.73?sources=0;2&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-matrix/src/test/resources/directions_matrix_2x3.json

geocoding-fixtures:
# Geocoding: 1600 Pennsylvania Ave NW
curl "https://api.mapbox.com/geocoding/v5/mapbox.places/1600+pennsylvania+ave+nw.json?access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-geocoding/src/test/resources/geocoding.json

# Reverse geocoding: -77.0366, 38.8971
curl "https://api.mapbox.com/geocoding/v5/mapbox.places/-77.0366,38.8971.json?access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-geocoding/src/test/resources/geocoding_reverse.json

# Not supported country
curl "https://api.mapbox.com/geocoding/v5/mapbox.places/1600+pennsylvania+ave+nw.json?country=aq&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-geocoding/src/test/resources/geocoding_country_not_supported.json

geocoding-batch-fixtures:
curl "https://api.mapbox.com/geocoding/v5/mapbox.places-permanent/20001;20009;22209.json?access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-geocoding/src/test/resources/geocoding_batch.json

directions-fixtures:
# Directions: polyline geometry with precision 5
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-122.416667,37.783333;-121.900000,37.333333?geometries=polyline&steps=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5.json

# Directions: request annotations
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-122.416667,37.783333;-121.900000,37.333333?geometries=polyline&language=sv&steps=true&annotations=distance,duration,speed&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_annotations_v5.json

# Directions: polyline geometry with precision 6
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-122.416667,37.783333;-121.900000,37.333333?geometries=polyline6&steps=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_precision_6.json

# Directions: route with a rotary
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-77.04430818557739,38.908650612656864;-77.04192638397217,38.90963574367117?geometries=polyline&steps=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_fixtures_rotary.json

# Directions: route with traffic
curl "https://api.mapbox.com/directions/v5/mapbox/driving-traffic/-122.416667,37.783333;-121.900000,37.333333?geometries=polyline&steps=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_traffic.json

# Directions: allow roundabout exits
curl "https://api.mapbox.com/directions/v5/mapbox/driving-traffic/-77.04014240930304,38.91313201360546;-77.04573453985853,38.90725177816208.json?steps=true&overview=full&geometries=polyline&roundabout_exits=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_roundabout_exits.json

# Directions: voice announcements fixture
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-77.04014240930304,38.91313201360546;-77.04573453985853,38.90725177816208.json?steps=true&overview=full&geometries=polyline6&roundabout_exits=true&voice_instructions=true&banner_instructions=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_voice_banner.json

# Directions: voice announcements invalid locale
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-77.04014240930304,38.91313201360546;-77.04573453985853,38.90725177816208.json?steps=true&overview=full&geometries=polyline6&roundabout_exits=true&voice_instructions=true&language=he&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_voice_invalid.json

# Directions: No route found
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-151.2302,-33.9283;-174.7654,-36.8641.json?access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_no_route.json

# Directions: route with banner shield
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-95.69263,29.78771;-95.54899,29.78284.json?steps=true&overview=full&geometries=polyline6&roundabout_exits=true&voice_instructions=true&banner_instructions=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_banner_with_shield.json

# Directions: route with bannerText
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-122.03067988107114,37.331808179989494;-122.03178702099605,37.3302383113533?voice_units=imperial&roundabout_exits=true&geometries=polyline&overview=full&steps=true&voice_instructions=true&banner_instructions=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_banner_text.json

# Directions: route with maxspeed
curl "https://api.mapbox.com/directions/v5/mapbox/driving-traffic/9.950072,52.150015;7.569915,52.916751?alternatives=true&geometries=polyline6&overview=full&steps=true&bearings=%3B&continue_straight=true&annotations=maxspeed&language=en&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_max_speed_annotation.json

# Directions: route with sub (and lane data) in BannerInstructions
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-122.403561,37.777689;-122.405786,37.770369.json?access_token=$(MAPBOX_ACCESS_TOKEN)&steps=true&geometries=polyline&banner_instructions=true" \
-o services-directions/src/test/resources/directions_v5_banner_instructions.json

# Directions: route with approaches in request
curl "https://api.mapbox.com/directions/v5/mapbox/driving/13.4301,52.5109;13.432507621760521,52.501725088556014?approaches=unrestricted;curb&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_approaches.json

# Directions: includes waypoint_names
curl "https://api.mapbox.com/directions/v5/mapbox/cycling/-122.42,37.78;-77.03,38.91?steps=true&voice_instructions=true&banner_instructions=true&voice_units=imperial&waypoint_names=Home;Work&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_waypoint_names.json

# Directions: includes waypoint_targets
curl "https://api.mapbox.com/directions/v5/mapbox/driving-traffic/-6.80904429026134,62.00015328799685;-6.800065040588378,62.00012400993553?waypoint_targets=;-6.799936294555664,61.99987216574813&steps=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_waypoint_targets.json

# Directions: post request
curl -d "coordinates=$(DIRECTIONS_POST_COORDINATES)&steps=true&waypoints=0;6&waypoint_names=Home;Work&banner_instructions=true" "https://api.mapbox.com/directions/v5/mapbox/driving?access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-directions/src/test/resources/directions_v5_post.json

mapmatching-fixtures:
curl "https://api.mapbox.com/matching/v5/mapbox/driving/$(MAP_MATCHING_COORDINATES)?geometries=polyline&language=sv&steps=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-matching/src/test/resources/map_matching_v5_polyline.json

# Unmatchable MapMatching request
curl "https://api.mapbox.com/matching/v5/mapbox/driving/0,-40;0,-20?access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-matching/src/test/resources/mapmatching_nosegment_v5_polyline.json

# MapMatching request with approaches
curl "https://api.mapbox.com/matching/v5/mapbox/driving/-117.1728265285492,32.71204416018209;-117.17334151268004,32.71254065549407?approaches=unrestricted;curb&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-matching/src/test/resources/mapmatching_v5_approaches.json

# MapMatching request with waypoint_names:
curl "https://api.mapbox.com/matching/v5/mapbox/driving/2.344003915786743,48.85805170891599;2.346750497817993,48.85727523615161;2.348681688308716,48.85936462637049;2.349550724029541,48.86084691113991;2.349550724029541,48.8608892614883;2.349625825881958,48.86102337068847;2.34982967376709,48.86125629633996?steps=true&tidy=true&waypoints=0;6&waypoint_names=Home;Work&banner_instructions=true&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-matching/src/test/resources/mapmatching_v5_waypoint_names.json

# MapMatching with valid voiceLanguage
curl "https://api.mapbox.com/matching/v5/mapbox/driving/$(MAP_MATCHING_COORDINATES)?steps=true&overview=full&geometries=polyline6&roundabout_exits=true&voice_instructions=true&language=en&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-matching/src/test/resources/map_matching_v5_voice_language.json

# MapMatching with invalid voiceLanguage
curl "https://api.mapbox.com/matching/v5/mapbox/driving/$(MAP_MATCHING_COORDINATES)?steps=true&overview=full&geometries=polyline6&roundabout_exits=true&voice_instructions=true&language=he&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-matching/src/test/resources/map_matching_v5_invalid_voice_language.json

# MapMatching with post request
curl -d "coordinates=2.344003915786743,48.85805170891599;2.346750497817993,48.85727523615161;2.348681688308716,48.85936462637049;2.349550724029541,48.86084691113991;2.349550724029541,48.8608892614883;2.349625825881958,48.86102337068847;2.34982967376709,48.86125629633996&steps=true&tidy=true&waypoints=0;6" "https://api.mapbox.com/matching/v5/mapbox/driving?access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-matching/src/test/resources/map_matching_v5_post.json

optimization-fixtures:
# request an optimized car trip with no additional options
curl "https://api.mapbox.com/optimized-trips/v1/mapbox/driving/-122.42,37.78;-122.45,37.91;-122.48,37.73?access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-optimization/src/test/resources/optimized_trip.json

curl "https://api.mapbox.com/optimized-trips/v1/mapbox/cycling/-122.42,37.78;-122.45,37.91;-122.48,37.73?steps=true&language=sv&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-optimization/src/test/resources/optimized_trip_steps.json

curl "https://api.mapbox.com/optimized-trips/v1/mapbox/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219;13.418555,52.523215?roundtrip=true&distributions=3,1&access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-optimization/src/test/resources/optimized_trip_distributions.json

tilequery-fixtures:
# Fetch features at Fort Mason, CA
curl "https://api.mapbox.com/v4/mapbox.mapbox-streets-v7/tilequery/-122.42901,37.806332.json?access_token=$(MAPBOX_ACCESS_TOKEN)" \
-o services-tilequery/src/test/resources/tilequery.json

# Fetch features at Fort Mason, CA
curl "https://api.mapbox.com/v4/mapbox.mapbox-streets-v7/tilequery/-122.42901,37.806332.json?access_token=$(MAPBOX_ACCESS_TOKEN)&" \
-o services-tilequery/src/test/resources/tilequery-all-params.json

isochrone-fixtures:

# Fetch isochrone driving information with polygon information. The query Point is in downtown Los Angeles.
curl "https://api.mapbox.com/isochrone/v1/mapbox/driving/-118.22258,33.99038?contours_minutes=5,30,55&contours_colors=6706ce,04e813,4286f4&polygons=true&access_token=$(MAPBOX_ACCESS_TOKEN)&" \
-o services-isochrone/src/test/resources/isochroneWithPolygons.json

# Fetch isochrone driving information without polygon information. The query Point is in downtown Los Angeles.
curl "https://api.mapbox.com/isochrone/v1/mapbox/driving/-118.22258,33.99038?contours_minutes=5,30,55&contours_colors=6706ce,04e813,4286f4&polygons=false&access_token=$(MAPBOX_ACCESS_TOKEN)&" \
-o services-isochrone/src/test/resources/isochroneNoPolygons.json

clean:
./gradlew clean
Loading

0 comments on commit b326cfd

Please sign in to comment.