-
Notifications
You must be signed in to change notification settings - Fork 502
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
Fix for SDK token use in Gradle builds (#604) #621
Conversation
Updated build.gradle to reference gradle.properties, and to use MAPBOX_DOWNLOADS_TOKEN rather than SDK_REGISTRY_TOKEN. This makes it consistent with the Android installation instructions. Also updated documentation to note this step as it's no longer iOS specific.
@@ -13,7 +13,7 @@ buildscript { | |||
} | |||
|
|||
rootProject.allprojects { | |||
def token = System.getenv('SDK_REGISTRY_TOKEN') | |||
def token = project.property('MAPBOX_DOWNLOADS_TOKEN') |
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.
This doesn't return environment variables anymore, does it?
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.
You can set Gradle project properties using environment variables: https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties
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.
I see, thanks! But that doesn't necessarily make it easier to follow the Mapbox tutorial :)
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!!! It's work in -> /snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/mapbox_gl-0.12.0/android/build.gradle (Ubuntu)
According to the official mapbox documentation the way of getting the token key should be: This is a blocking issue for android, so please fix this PR and merge it as soon as posible. |
Hi @luis901101 - can you clarify what needs to be "fixed"? I've only seen questions on this PR not comments. I was under the impression I'm still waiting for the maintainer to review it. |
I am currently using this branch, but using |
I mean, the documentation referenced by this plugin is the official documentation of mapbox where it's explained how the TOKEN should be set. In this documentation the token is named like |
It is can be like |
Would be great to see this merged |
I suggest to also write proper instructions in Readme on how project should be setup now. |
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.
Shouldn't both iOS and Android, ideally, use the same project-specific property somehow?
@AAverin I agree in principle, but this Flutter package should use whatever is documented in the MapBox SDK. |
this was fixed with #721 |
Updated build.gradle to reference gradle.properties, and to use MAPBOX_DOWNLOADS_TOKEN rather than SDK_REGISTRY_TOKEN. This makes it consistent with the Android installation instructions.
Also updated documentation to note this step as it's no longer iOS specific.