Skip to content

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

Open
kikoso wants to merge 2 commits into
mainfrom
chore/drop-apache-http-legacy
Open

kikoso wants to merge 2 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 568822e on main (#1063).

Module Line % Change Branch % Change
maps-compose 15.27% no change 3.76% no change
maps-compose-utils 6.12% no change 4.39% no change
maps-compose-widgets 10.88% no change 11.11% no change
TOTAL 12.99% no change 4.11% 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

Copy link
Copy Markdown
Contributor

Coverage (instrumentation tests)

Overall Project 43.74% 🍏

There is no coverage information present for the Files changed

This branch has not been deployed

No deployments
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