-
-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Mapbox or MapLibre from SPM on iOS, and different libs on android #1311
Conversation
99b1ae6
to
1c97aaf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
android/rctmgl/build.gradle
Outdated
@@ -36,8 +36,14 @@ dependencies { | |||
|
|||
// Mapbox SDK | |||
if (rootProject.ext.has('rnmbglMapboxLibs')) { | |||
rootProject.ext.get('rnmbglMapboxLibs').split(';').each { | |||
implementation it | |||
def libs = rootProject.ext.get('rnmbglMapboxLibs') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we move rnmbglMapboxLibs
and rnmbglMapboxPlugins
in some form of constant, you know have one place to change it.
Also, is this the recommended way to have variable dependencies?
Not gonna complain, just feels kinda hacky :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
react-native-mapbox-gl.podspec
Outdated
rpm_spec = { | ||
url: "https://github.com/maplibre/maplibre-gl-native-distribution", | ||
requirement: { | ||
kind: "upToNextMajorVersion", | ||
minimumVersion: "5.11.0" | ||
}, | ||
product_name: "Mapbox" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this here, when we have it in the Podfile
, or why have it there if it's here?
I'd assume you want to extract it from the Podfile
to make it more user editable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we also support $RNMBGL_Use_SPM = true
to use Maplibre from spm with those default params. Not sure if that's desired/or good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should be opinionated towards one?
Configuration is cool and all, however I feel like the install steps are already confusing to some user.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the short term I think this is for advanced users.
Later we can consider defaulting to MapLibre as It doesn't require the access token dance.
@mfazekas , also let me know, when you're done with this - I can assist with the README/ Installation guides/ Changelog and test a bit |
63a3e25
to
b102d54
Compare
b102d54
to
5c21ba8
Compare
@ferdicus I'm done with the PR |
Cool, thanks for this - I'll try to test this in the coming days. 👍🏿 |
Description
This PR allows to specify the Mapbox library to be consumed via SwiftPackageManager. This means MapLibre for example can be used instead of Mapbox.
Fixes #1273
Podfile:
Top level build.gradle: