Skip to content

Upgrade mockwebserver to 3.8.1 from OkHttp distribution#301

Merged
domesticmouse merged 1 commit intogooglemaps:masterfrom
apjanke:mockwebserver-from-okhttp
Aug 2, 2017
Merged

Upgrade mockwebserver to 3.8.1 from OkHttp distribution#301
domesticmouse merged 1 commit intogooglemaps:masterfrom
apjanke:mockwebserver-from-okhttp

Conversation

@apjanke
Copy link
Copy Markdown
Contributor

@apjanke apjanke commented Jul 28, 2017

This library uses an old version of mockwebserver from back when it was a standalone project. It has since been folded in to OkHttp, which this project also uses. The new mockwebserver is at com.squareup.okhttp3:mockwebserver:3.8.1.

From their old Google Code website:

screen shot 2017-07-28 at 6 34 19 pm

Shall we upgrade to the new version from OkHttp? It looks like this project is keeping current on all its other dependencies.

This PR accomplishes the upgrade by changing the mockwebserver dependency to the new com.squareup.okhttp3:mockwebserver:3.8.1 one, and updating the code to handle the mockwebserver API changes between 20130706 and 3.8.1.

Tests pass locally for me.

@domesticmouse
Copy link
Copy Markdown
Contributor

Can you please run ./gradlew googleFormatJava? This PR looks like it will fail the format check due to the ordering of the imports. Thanks!

This upgrades from the old standalone mockwebserver to the new one that's folded in to OkHttp.
@apjanke
Copy link
Copy Markdown
Contributor Author

apjanke commented Jul 30, 2017

I manually amended the code to comply with the format check, based on my reading of Google's Java Style Guide section on import statements.

Also rebased on master.

When I run ./gradlew googleFormatJava, I just get an error about it being an undefined task.

$ ./gradlew googleFormatJava

FAILURE: Build failed with an exception.

* What went wrong:
Task 'googleFormatJava' not found in root project 'google-maps-services-java'.

* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED in 0s

Do I need to install some other library or something to get this to work? I read the build instructions, and don't see anything that looks relevant.

@domesticmouse
Copy link
Copy Markdown
Contributor

Whacky. I'll land this PR as is and fix up any issues. Thanks!

@domesticmouse domesticmouse merged commit 5af4ed0 into googlemaps:master Aug 2, 2017
@apjanke
Copy link
Copy Markdown
Contributor Author

apjanke commented Aug 2, 2017

You're welcome. And thanks!

@apjanke apjanke deleted the mockwebserver-from-okhttp branch August 2, 2017 14:01
@apjanke
Copy link
Copy Markdown
Contributor Author

apjanke commented Aug 9, 2017

Oh, my problem is obvious now: It's ./gradlew googleJavaFormat, not ./gradlew googleFormatJava. It works for me now that I got the name right.

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.

2 participants