Skip to content

Migrate Android build configuration to Kotlin DSL & Built-in Kotlin#1135

Open
faheem-riaz wants to merge 33 commits into
mapbox:mainfrom
faheem-riaz:faheem/v2.25.0-builtin-kotlin
Open

Migrate Android build configuration to Kotlin DSL & Built-in Kotlin#1135
faheem-riaz wants to merge 33 commits into
mapbox:mainfrom
faheem-riaz:faheem/v2.25.0-builtin-kotlin

Conversation

@faheem-riaz

Copy link
Copy Markdown

This PR migrates the Android build configuration from Groovy build.gradle to Kotlin DSL (build.gradle.kts) and moves to the Built-in Kotlin style by removing the legacy Kotlin Gradle Plugin (KGP) dependencies. It also upgrades the Android Gradle Plugin (AGP) version classpath to 9.0.1 to support modern builds.

mapbox-ci and others added 30 commits May 6, 2026 06:28
…eecfa`

GitOrigin-RevId: 2803d3ab8608af8672c4f54d3696291aad5de49b
GitOrigin-RevId: abf4a116edcef8a156b764e6a5a22073f433545c
…aps-android v11.25.0-alpha.2, maps-ios v11.25.0-alpha.2, maps-flutter v2.25.0-alpha.2, navigation-android v3.25.0-alpha.2, navigation-native v324.25.0-alpha.2, navigation-sdk-cpp v0.25.0-alpha.2, search v2.25.0-alpha.2, search-ios v2.25.0-alpha.2

  common 24.25.0-alpha.2
  gl-native 11.25.0-alpha.2
  maps-android 11.25.0-alpha.2
  maps-ios 11.25.0-alpha.2
  maps-flutter 2.25.0-alpha.2
  navigation-android 3.25.0-alpha.2
  navigation-native 324.25.0-alpha.2
  navigation-sdk-cpp 0.25.0-alpha.2
  search 2.25.0-alpha.2
  search-ios 2.25.0-alpha.2

GitOrigin-RevId: 7cfcf2c4203b66bc599bd7c56b3e6eb0360ef0ae
…54386`

GitOrigin-RevId: 89676c748b18e1ed17659b5bae938ee9ffc45d2b
GitOrigin-RevId: 8b3f10015bec9877fc12baaa41ca6b72b4fde6af
…38122`

GitOrigin-RevId: 2b7b9236e8892b346468175ab2efdfd6eaace5e2
…a71d8`

GitOrigin-RevId: 3d8732eb5e5ad7e59a95ed13b7b696bf72b68c5a
…ae5a9`

GitOrigin-RevId: 1f8f253763e1134a79601ec41c526b681ed833c6
…98316`

GitOrigin-RevId: b7d2b320aa3c1e054344084261ec599aee392982
GitOrigin-RevId: 220cb0ffee5ec5e2b3a5cd3d57d56d1350127020
## Summary

- Expose `MapboxHttpService.setMaxRequestsPerHost(int)` from Dart,
bridging to `com.mapbox.common.HttpServiceFactory.setMaxRequestsPerHost`
(Android) and
`MapboxCommon.HttpServiceFactory.setMaxRequestsPerHostForMax` (iOS).
- Lets apps cap concurrent HTTP requests per host, reducing the chance
of tripping per-token rate limits during offline tile region downloads.
- Wired through the existing `MapboxHttpService` MethodChannel (next to
`setCustomHeaders`) rather than introducing a separate
`HttpServiceFactory` pigeon API — the underlying setting is global on
native either way.
- Tracked in MAPSFLT-594; addresses the customer ask in
mapbox#1021.

Public API:

```dart
await mapboxMap.httpService.setMaxRequestsPerHost(2);
```

`max` is in the range 1..255 (uint8 on the native side; iOS clamps,
Android byte-truncates).

## Test plan

- [ ] `flutter analyze` clean
- [ ] `make format` clean
- [ ] iOS example builds (`flutter build ios`)
- [ ] Android example builds (`flutter build apk`)
- [ ] Integration test passes on both platforms (`flutter test
integration_test/http_service_test.dart`)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GitOrigin-RevId: 12ab3a788a9ee7ca30e336fbd37d4798e609f3cb
GitOrigin-RevId: 4e4715583e422d712479fd1ab9503b2bb96cd3e2
…(#13849)

GitOrigin-RevId: ccb89dbb07b9355da315c2b4f263e7eb835cb3bf
…c0f81`

GitOrigin-RevId: 4f5c99042648ed4e1ff2d69cbfbaa2dea49e9b2c
…cdcd1`

GitOrigin-RevId: d271323fd38f1f2eb6259d1be3dea60c9b275c49
…a02a0`

GitOrigin-RevId: 2a66e50000cb57f7832670cdcf246f8ee059f67a
…2d3dd`

GitOrigin-RevId: 5b1f4aed29d465c75a67aef8f6266edccb0dfa70
…42ed2`

GitOrigin-RevId: c95bcf00807f795d6da2002abccdd4d7855b3ce2
GitOrigin-RevId: d179b42cadb0dde54aa8f6a5bb17152ea20c3636
…79b42`

GitOrigin-RevId: a3f2fa93ac07f0a7b5d57aa3d997a179a1d1ccb7
GitOrigin-RevId: 9879c00d0dbb76c877eaf1690c48f1c221faa417
…82b17`

GitOrigin-RevId: 6758b4cb53f8037db35eac2f9ba37893acd54439
GitOrigin-RevId: ed630584551213827b56d788431ce51479e7cf07
…e8c96`

GitOrigin-RevId: ab15e53f88b82ba1ac5c32332b3dcbd35b847ff8
…7dc14`

GitOrigin-RevId: 845a530d32cf3ec3dcb58f36922c8462ca99d140
GitOrigin-RevId: 5ad4ea33bec4c2530d65cd1800ae706019a99929
GitOrigin-RevId: d72c699070659a5b635fdf8893777c4766baf56c
…c6401`

GitOrigin-RevId: eea6cb45fe218d33a25d90c3ca9e98f251359c8e
GitOrigin-RevId: 8c788c7dfe73964a840f6d1d777d0b0bd693e40a
…0f62e`

GitOrigin-RevId: c86725522ed0667d1dab69d99b24edc89f10b4af
mapbox-ci and others added 3 commits June 11, 2026 16:50
…0b566`

GitOrigin-RevId: 546cf8b9feb3a9012134b2d7ea43c32fddc7a8da
GitOrigin-RevId: 6c18986c3855cff0a18ee0b1a4147bcb68b57018
@faheem-riaz faheem-riaz requested a review from a team as a code owner June 28, 2026 09:00
@faheem-riaz faheem-riaz requested a review from maios June 28, 2026 09:00
@CLAassistant

CLAassistant commented Jun 28, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 7 committers have signed the CLA.

✅ maios
✅ faheem-riaz
✅ evil159
❌ temap
❌ github-actions[bot]
❌ yunikkk
❌ kiryldz
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

7 participants