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

cronet_http: depend on org.chromium.net:cronet-api instead #807

Closed
kmod-midori opened this issue Oct 9, 2022 · 4 comments · Fixed by #853 or #1111
Closed

cronet_http: depend on org.chromium.net:cronet-api instead #807

kmod-midori opened this issue Oct 9, 2022 · 4 comments · Fixed by #853 or #1111
Assignees
Labels
package:cronet_http type-enhancement A request for a change that isn't a bug

Comments

@kmod-midori
Copy link

The current implementation depends on com.google.android.gms:play-services-cronet, which pulls in the Google Play services. This might be undesirable for apps that do not want to have GMS code in them (and those who mainly target Chinese users and do not have GMS available).

We should depend on Chromium's API package, which will find the relevant dependencies automatically if they are declared. Additional documentations should be provided to the users on how to choose a Cronet provider (similar to https://exoplayer.dev/network-stacks.html#cronet).

@kmod-midori kmod-midori added package:cronet_http type-enhancement A request for a change that isn't a bug labels Oct 9, 2022
@brianquinlan
Copy link
Collaborator

Hey @chengyuhui ,

So the idea is that:

  1. cronet_http would depend on com.google.android.gms:play-services-cronet
  2. the user would then have to depend on either com.google.android.gms:play-services-cronet or org.chromium.net:cronet-embedded.
  3. the user would then create the appropriate CronetEngine

?

That seems like a lot of user complexity. I wonder if there is a way that we can use this one repo to release two packages: one with cronet embedded and one using play services?

@kmod-midori
Copy link
Author

That's another valid idea, but might be difficult unless we are copying code around...

@brianquinlan
Copy link
Collaborator

Ideally, someone interested could create a fork of cronet_http and configure it to use org.chromium.net:cronet-embedded. That way users could pick the implementation that they want without having to deal with any complex configuration.

@AlexV525
Copy link
Contributor

If the only difference in the implementation is importing and the implementation definition, it can be ideally done with different branches and setup a proper continue integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment