Skip to content
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

Plugins can't add dependencies on custom maven repositories #9881

Closed
collinjackson opened this issue May 8, 2017 · 4 comments · Fixed by #11447
Closed

Plugins can't add dependencies on custom maven repositories #9881

collinjackson opened this issue May 8, 2017 · 4 comments · Fixed by #11447
Assignees
Labels
p: tooling Affects the flutter_plugin_tools package package flutter/packages repository. See also p: labels.

Comments

@collinjackson
Copy link
Contributor

collinjackson commented May 8, 2017

Steps to Reproduce

Right now the image_picker plugin has a dependency on the Android Image Picker Android library, which lives on GitHub along with the helper library Glide. Pulling in these libraries requires using Jitpack, which is a package repository that proxies requests to GIt. The codelab currently has a step where developers enable Jitpack by adding the following to their build.gradle:

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }  // new
    }
}

It would be nice if the plugins could know that they depend on the Jitpack repo and add this dependency automatically. Relatedly on iOS, perhaps plugins could add dependencies on third-party Cocoapods spec repos as well.

The downside of fixing this limitation is that it would make it less predictable for the Flutter developer where all their code is coming from. So maybe this is "working as intended"? But if they're using plugins they're already depending on pub to make builds. It certainly would be nice if developers could get things done with plugins without having to make build.gradle edits.

Somewhat lower priority in that this could probably be fixed in a way that isn't a breaking API change.

/cc @mravn-google @mit-mit @jakobr-google @szakarias

@collinjackson collinjackson added the p: tooling Affects the flutter_plugin_tools package label May 8, 2017
@collinjackson collinjackson changed the title Plugins can't add dependencies on Jitpack Maven repositories Plugins can't add dependencies on Jitpack gradle repositories May 8, 2017
@Hixie Hixie added the plugin label May 23, 2017
@mit-mit mit-mit added this to the 3: Current Milestone milestone Jun 12, 2017
@mit-mit
Copy link
Member

mit-mit commented Jun 14, 2017

Generalizing this bug to cover specifying a dependency on any custom maven repository:
maven { url '<maven_repo_url>' }

Besides the original jitpack example, other similar cases include ZenDesk and fabric.io.

@mit-mit mit-mit changed the title Plugins can't add dependencies on Jitpack gradle repositories Plugins can't add dependencies on custom maven repositories Jun 14, 2017
@goderbauer
Copy link
Member

FYI: This issue is causing flutter/plugins#141 to be a breaking change (even though the plugin API is untouched, I am just adding new dependencies to the plugin).

@mit-mit
Copy link
Member

mit-mit commented Jun 20, 2017

cc @mravn-google

@github-actions
Copy link

github-actions bot commented Sep 4, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: tooling Affects the flutter_plugin_tools package package flutter/packages repository. See also p: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants