From a5918af3bfc06c6c5792b4df869e41216fb72450 Mon Sep 17 00:00:00 2001 From: Jesse Bickel Date: Tue, 30 Sep 2025 15:21:21 -0500 Subject: [PATCH] Shade newly included-in-Twilio libraries This avoids classpath conflicts when this jar is included in Keycloak. Keycloak 26 appears to use HttpClient 4 while Twilio's library 11 uses HttpClient 5. Include `org.publicsuffix` in case it is used. Fixes #81 Twilio provider shaded jar is larger than expected --- twilio-keycloak-provider/build.gradle.kts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/twilio-keycloak-provider/build.gradle.kts b/twilio-keycloak-provider/build.gradle.kts index 4689b42..d648af7 100644 --- a/twilio-keycloak-provider/build.gradle.kts +++ b/twilio-keycloak-provider/build.gradle.kts @@ -102,6 +102,9 @@ tasks.shadowJar { relocate("com.twilio", "org.philanthropydatacommons.shadow.com.twilio") relocate("org.json", "org.philanthropydatacommons.shadow.org.json") relocate("io.jsonwebtoken", "org.philanthropydatacommons.shadow.io.jsonwebtoken") + relocate("org.apache.hc.core5", "org.philanthropydatacommons.shadow.org.apache.hc.core5") + relocate("org.apache.hc.client5", "org.philanthropydatacommons.shadow.org.apache.hc.client5") + relocate("org.publicsuffix", "org.philanthropydatacommons.shadow.org.publicsuffix") // The mergeServiceFiles also relocates the SPI definitions in META-INF/services mergeServiceFiles()