parse-community / Parse-SDK-Android

The Android SDK for Parse Platform
https://parseplatform.org/
Other
1.89k stars 736 forks source link

Update OkHttp dependency from 4.10.0 to 4.12.0 #1221

Open velkind opened 2 hours ago

velkind commented 2 hours ago

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

parse-github-assistant[bot] commented 2 hours ago

Thanks for opening this issue!