Skip to content

chore(demo): explain why the demo keeps the Apache HTTP legacy library - #1081

Merged
dkhawk merged 3 commits into
mainfrom
chore/drop-apache-http-legacy
Nov 10, 2026
Merged

dkhawk merged 3 commits into
mainfrom
chore/drop-apache-http-legacy

Conversation

@kikoso

@kikoso kikoso commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Addresses #1080.

#1080 asks whether <uses-library android:name="org.apache.http.legacy" /> in the demo manifest is still needed. The Maps SDK setup docs only require it for play-services-maps 16.0.0 or below, and the demo uses 20.0.0, so the first version of this PR removed it together with useLibrary("org.apache.http.legacy").

The emulator tests show it is still needed. Without it, GoogleMapViewClusteringTests crashed the process with:

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
	at com.google.maps.api.android.lib6.drd.aj.a(:com.google.android.gms.dynamite_mapsdynamite@202414056@20.24.14 ...)

The map renderer runs inside Google Play services, not from the app's play-services-maps dependency. On the CI emulator image (Play services 20.24.14), its legacy renderer loads org.apache.http classes through the app's class loader. So the declaration matters on devices with older Play services, whatever play-services-maps version the app compiles against.

This PR now keeps both lines and adds a comment next to each, explaining why, which is what the reporter suggested in the issue.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Coverage (unit tests)

Compared against bc7a4bf on main (#1081).

Module Line % Change Branch % Change
maps-compose 15.27% no change 3.76% no change
maps-compose-utils 26.29% no change 12.70% no change
maps-compose-widgets 10.88% no change 11.11% no change
TOTAL 17.75% no change 5.83% no change

Line and branch coverage from unit test reports. History is recorded on the coverage-history branch after each merge to main.

@kikoso kikoso changed the title chore(demo): drop the unused Apache HTTP legacy library chore(demo): explain why the demo keeps the Apache HTTP legacy library Nov 6, 2026
@googlemaps-bot

googlemaps-bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Coverage (instrumentation tests)

Overall Project 43.66% 🍏

There is no coverage information present for the Files changed

@dkhawk
dkhawk merged commit bc7a4bf into main Nov 10, 2026
13 checks passed
@dkhawk
dkhawk deleted the chore/drop-apache-http-legacy branch November 10, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants