File tree Expand file tree Collapse file tree 2 files changed +40
-4
lines changed
Expand file tree Collapse file tree 2 files changed +40
-4
lines changed Original file line number Diff line number Diff line change @@ -76,14 +76,14 @@ Install the Contentful dependency:
7676<dependency >
7777 <groupId >com.contentful.java</groupId >
7878 <artifactId >java-sdk</artifactId >
79- <version >10.5.23 </version >
79+ <version >10.5.25 </version >
8080</dependency >
8181```
8282
8383* _ Gradle_
8484
8585``` groovy
86- compile 'com.contentful.java:java-sdk:10.5.23 '
86+ compile 'com.contentful.java:java-sdk:10.5.25 '
8787```
8888
8989This library requires Java 8 (or higher version) or Android 21.
@@ -384,6 +384,37 @@ OkHttpClient httpClient = clientBuilder.defaultCallFactoryBuilder()
384384CDAClient cdaClient = clientBuilder. setCallFactory(httpClient). build();
385385```
386386
387+ Android and OkHttp 5
388+ --------------------
389+
390+ OkHttp 5 splits platform artifacts. This SDK depends on ` okhttp-jvm ` so it works out of the box for JVM users. For Android apps, depend on ` okhttp-android ` and exclude ` okhttp-jvm ` from this SDK to avoid duplicate-class errors.
391+
392+ Gradle (Kotlin DSL):
393+
394+ ``` kotlin
395+ dependencies {
396+ implementation(platform(" com.squareup.okhttp3:okhttp-bom:5.1.0" ))
397+ implementation(" com.squareup.okhttp3:okhttp-android" )
398+
399+ implementation(" com.contentful.java:java-sdk:10.5.24" ) {
400+ exclude(group = " com.squareup.okhttp3" , module = " okhttp-jvm" )
401+ }
402+ }
403+ ```
404+
405+ Gradle (Groovy):
406+
407+ ``` groovy
408+ dependencies {
409+ implementation platform('com.squareup.okhttp3:okhttp-bom:5.1.0')
410+ implementation 'com.squareup.okhttp3:okhttp-android'
411+
412+ implementation('com.contentful.java:java-sdk:10.5.24') {
413+ exclude group: 'com.squareup.okhttp3', module: 'okhttp-jvm'
414+ }
415+ }
416+ ```
417+
387418Proguard
388419--------
389420
Original file line number Diff line number Diff line change 33
44 <groupId >com.contentful.java</groupId >
55 <artifactId >java-sdk</artifactId >
6- <version >10.5.23 </version >
6+ <version >10.5.25 </version >
77 <packaging >jar</packaging >
88
99 <name >${project.groupId} :${project.artifactId} </name >
5353 <retrofit .version>2.11.0</retrofit .version>
5454 <rxjava .version>3.1.9</rxjava .version>
5555 <gson .version>2.11.0</gson .version>
56- <okhttp .version>4.12 .0</okhttp .version>
56+ <okhttp .version>5.1 .0</okhttp .version>
5757
5858 <!-- Test Dependencies -->
5959 <commonsio .version>2.7</commonsio .version>
104104 <artifactId >okhttp</artifactId >
105105 <version >${okhttp.version} </version >
106106 </dependency >
107+ <dependency >
108+ <groupId >com.squareup.okhttp3</groupId >
109+ <artifactId >okhttp-jvm</artifactId >
110+ <version >${okhttp.version} </version >
111+ </dependency >
107112
108113 <dependency >
109114 <groupId >commons-io</groupId >
You can’t perform that action at this time.
0 commit comments