Parse-SDK-Android icon indicating copy to clipboard operation
Parse-SDK-Android copied to clipboard

Update OkHttp dependency from 4.10.0 to 4.12.0

Open velkind opened this issue 1 year ago • 1 comments

New Feature / Enhancement Checklist

Current Limitation

Obfuscating Android source code using R8 compiler throws several errors if Android project depends on Parse SDK for Android 4.3.0:

Missing class org.bouncycastle.jsse.BCSSLParameters (referenced from: void okhttp3.internal.platform.BouncyCastlePlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List) and 1 other context) Missing class org.bouncycastle.jsse.BCSSLSocket (referenced from: void okhttp3.internal.platform.BouncyCastlePlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List) and 5 other contexts) Missing class org.bouncycastle.jsse.provider.BouncyCastleJsseProvider (referenced from: void okhttp3.internal.platform.BouncyCastlePlatform.<init>()) Missing class org.conscrypt.Conscrypt$Version (referenced from: boolean okhttp3.internal.platform.ConscryptPlatform$Companion.atLeastVersion(int, int, int)) Missing class org.conscrypt.Conscrypt (referenced from: boolean okhttp3.internal.platform.ConscryptPlatform$Companion.atLeastVersion(int, int, int) and 4 other contexts) Missing class org.conscrypt.ConscryptHostnameVerifier (referenced from: okhttp3.internal.platform.ConscryptPlatform$DisabledHostnameVerifier) Missing class org.openjsse.javax.net.ssl.SSLParameters (referenced from: void okhttp3.internal.platform.OpenJSSEPlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List)) Missing class org.openjsse.javax.net.ssl.SSLSocket (referenced from: void okhttp3.internal.platform.OpenJSSEPlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List) and 1 other context) Missing class org.openjsse.net.ssl.OpenJSSE (referenced from: void okhttp3.internal.platform.OpenJSSEPlatform.<init>())

This errors are related to OkHttp dependency. Missing classes when compiling with R8 means that there are references to these classes in the input, but they have no definition in the input neither in the program itself (from here).

Feature / Enhancement Description

From version 4.11.0 on OkHttp package contains Proguard rules to prevent warnings about missing classes. Because the last two OkHttp 4.* minor releases 4.11.0 and 4.12.0 contain a lot of another fixes I propose to bump OkHttp dependency from version 4.10.0 to version 4.12.0.

Example Use Case

N/A

Alternatives / Workarounds

Suppress errors above in proguard-rules.pro file of Android project.

3rd Party References

N/A

velkind avatar Nov 01 '24 18:11 velkind

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!