From 35fdf012101c3fa2cbd307ae6119daf555182629 Mon Sep 17 00:00:00 2001 From: shawn Date: Fri, 2 Dec 2022 11:52:09 -0800 Subject: [PATCH] #450: fixed okhttp3 classpath issue on android platform (#457) --- build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2618e4f1f..801017afd 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,11 @@ shadowJar { duplicatesStrategy DuplicatesStrategy.EXCLUDE archiveClassifier.set('') archiveFileName.set('stellar-sdk.jar') - relocate 'com.','shadow.com.' + relocate('com.', 'shadow.com.') { + // okhttp hardcodes android platform class loading to this package, shadowing would attempt to rewrite the hardcode + // to be 'shadow.com.android.org.conscrypt' which we don't want to happen. + exclude 'com.android.org.conscrypt' + } relocate 'net.','shadow.net.' relocate 'javax.annotation', 'shadow.javax.annotation' relocate 'org.apache','shadow.org.apache'