-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Support okhttp3 in the public interface of grpc-okhttp #8732
Comments
Hi, after adding the current version of okhttp3, I get the following error during the upper bound check
okhttp3 requires java 8. Any ideas on how to get it into the build? |
Note for others: this is related to #8610 and its fix #8650. Hmm... that's troublesome. We can make it a compileOnly dependency, and maybe that will help, but I doubt it will. Since this is Gradle noticing, I suspect it may be difficult to workaround. We can delay doing this a little bit, as Java 7 support should drop this quarter-ish (#4671). Really, I'd much rather figure out a way to tell Gradle "it's okay; ignore," but I have very little experience with Gradle Modules so I doubt I'll be too much help. I have seen this before, but in that case we stayed on the older version... |
Let's see, may be I could figure out way to work around that issue. |
Hi, I was not able to work around that issue. Since the current version of grpc-java dropped Java 1.7, I would go for the solution which makes okhttp2 and okhttp3 compileOnly. To do that, I’d like to drop the okhttp2 dependency in the internal implementation e.g., in the OkHttpClientTransport (it is also related to #6119). According to #8004, the portion of okio used in grpc-java works with okio1 and okio2, thus I won’t expect an issue. What do you think? |
Removing the dependency on OkHttp from OkHttpClientTransport and then making okhttp2 a compileOnly dependency sounds great. I had intended to do that, but haven't had time. And adding okhttp3 API as compileOnly should be easier now without Java 7. I'll just recommend doing those things as two separate PRs. |
Fixed by #8971 |
Is your feature request related to a problem?
grpc-okhttp does not support okhttp3 compatible versions in its public interface e.g. OkHttpChannelBuilder.
Describe the solution you'd like
Add support for okhttp3 to the public api e.g. OkHttpChannelBuilder to make it easier to use with okhttp3 compatible versions
Describe alternatives you've considered
Stick to the old version of okhttp 2
Additional context
Support both okhttp and okhttp3 in the public interface.
The text was updated successfully, but these errors were encountered: