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

Update to new Gradle dependency configurations #3723

Merged
merged 3 commits into from
Dec 17, 2017

Conversation

ShaishavGandhi
Copy link
Contributor

Signed-off-by: shaishavgandhi05 [email protected]

@JakeWharton
Copy link
Member

The use of implementation for OkHttp might not be accurate. For example, if we were to use this from Retrofit it would be incorrect as OkHttp types are exposed in Retrofit's API.

@ShaishavGandhi
Copy link
Contributor Author

True. Using implementation or api depends on the use case. I would be open to adding both
implementation 'com.squareup.okhttp3:okhttp:3.9.1' and api 'com.squareup.okhttp3:okhttp:3.9.1' both and adding a line explaining if you want okhttp types to be exposed beyond your module, you should use api.

@JakeWharton
Copy link
Member

Yeah it's an unfortunate side-effect of this new system. I'm not really sure what's best to do. Another potential approach is to only list the coordinates like

com.squareup.okhttp3:okhttp:3.9.0

and let people figure out how to apply that to Gradle, Maven, or whatever.

Anyone else have an opinion here? The problem is we have about 30 projects which have very similar READMEs so whatever we do it'd be nice to unify them in the new style.

@yschimke
Copy link
Collaborator

I think @shaishavgandhi05 suggestion is the best one, use implementation as the only example, as most end users will use that. Then a one line note referencing "api" for library maintainers to use is types are part of public API.

Signed-off-by: shaishavgandhi05 <[email protected]>
@ShaishavGandhi
Copy link
Contributor Author

I've kept implementation as it is and added a note about using OkHttp in a library and exposing its types in the public API.

@NightlyNexus
Copy link
Contributor

I'd like to eliminate the noisy boilerplate of READMEs that shows lines for build systems.
Having only the coordinates would be nice.

Unfortunately, I'm imagining hundreds of issues filed asking how to set every library up with Gradle and Maven.

Seems like implementation is good enough to be the copypasta.

@swankjesse swankjesse merged commit c22be89 into square:master Dec 17, 2017
@swankjesse
Copy link
Member

I removed the note about api vs. implementation, which seemed off-topic for OkHttp. Lets do the same for all of our READMEs. Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants