Skip to content

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

@collinjackson

Description

@collinjackson

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

Metadata

Metadata

Assignees

Labels

p: toolingAffects the flutter_plugin_tools packagepackageflutter/packages repository. See also p: labels.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions