I attempted to do a literal translation as much as possible.
Subprojects now need plugins to be configured directly so they
can use the appropriate syntax.
EventSource.cancel() did nothing if it was created by EventSources.processResponse.
All EventSources would continue to process buffered events rather than
breaking out sooner.
Also rename okhttp3.mockwebserverwrapper to okhttp3.mockwebserver
Directories are not renamed to minimize the git diff. That'll follow
in a separate commit.
Most users of the API are not impacted. The ones that are:
- CallTest subclasses QueueDispatcher
- DuplexTest uses duplex APIs
- HttpOverHttp2Test subclasses QueueDispatcher
This is part 2 of the plan described here:
https://github.com/square/okhttp/pull/6326
These two were 1:1 with each other and there were a few places in the code
where we had both. Putting them into the same class creates a class that
does has a lot of responsibilities, but I believe it's simpler overall than
having two classes.
This removes a bunch of low-value stuff from the pom.xml files:
- name
- description
- licence distribution ('repo')
- developers clause
- test dependencies
I don't think any of this will be missed, and it shrinks the pom.xml
file to the minimal set of useful stuff.
This also causes us to publish a gradle .module file. This is the
motivation for this change. It'll allow us to ship a Gradle platform,
which is a more capable than a Maven BOM.
The new ktlint sorts imports which makes this diff large.
The new japicmp ignores 'final' modifier changes in final classes.
We adopt the Google style for checkstyle.xml.
Okio readByteString() now uses segments more aggressively, so we
need to mitigate that to avoid tracking those segments in a test.
We used to do this lazily because OkHttpClient instances were
somewhat heavy: each standalone instance held its own
ExecutorService for the connection pool.
Now that we have TaskRunner each instance is much more
lightweight and the drawbacks of creating instances eagerly
is negligible.