Re: goog/master - Removal of org.apache.http.legacy from bootclasspath

268 views
Skip to first unread message

Jeff Davidson

unread,
Sep 7, 2017, 1:17:22 PM9/7/17
to Paul Duffin, Android Chatty Eng, Volley Users
+volley-users FYI

For the apps that are using Volley: please note that currently the legacy Apache HTTP JAR is a hard dependency of the library, even if you aren't using the Apache HTTP stack. Unfortunately some Apache classes are used in the current API signature.

I am hoping to rejigger the API such that this dependency is optional and can be omitted for apps that use the HttpUrlConnection-based stack or other alternatives. However, I've been a bit blocked on code reviews, so if you use Volley and would like to help me see this through, I would greatly appreciate some help there - ping me offline and I'll send the CLs your way.

Otherwise, be sure your projects are pointed to external/volley and not frameworks/volley to pick up the latest fixes, and I'll send more info out if/when we're able to do this.

On Thu, Sep 7, 2017 at 8:01 AM, Paul Duffin <pauld...@google.com> wrote:
All,
    If you do not have an APK or do not depend upon the org.apache.http.legacy JAR (directly or indirectly) then you can ignore this.

I am going to be submitting some changes into internal master that could affect you. I plan on submitting them Monday morning UK time unless anyone has objections. If you want to check the impact in advance of me submitting then you just need to cherry pick the 3 changes, do a clean build, vendor/google/tools/flashall -w and then perform your tests.

The changes in question (part of b/18027885) will remove the org.apache.http.legacy JAR from the bootclasspath for any APK that targets P or above. APKs that target O_MR1 (27) and below will still have the library on their classpath (not bootclasspath) for backwards compatibility.

APKs that require the classes in the org.apache.http.legacy JAR but which wish to target P or above must add the following to their manifest:
    <uses-library android:name="org.apache.http.legacy" android:required="false" />

The android:required attribute is unnecessary if the minSdkVersion is M or above as the org.apache.http.legacy library was added in M.

A lot of work has been done to ensure that any existing APKs that depend, directly or indirectly on org.apache.http.legacy have the correct entries in their manifest so that they will continue to work. However, it is possible that we missed some, either because they changed recently, are not built by default or are on private branches. If it does cause problems and updating your manifest does not fix it them please do not hesitate to contact me.

Thanks, Paul

Reply all
Reply to author
Forward
0 new messages