Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Update to Kotlin 1.3.20, Serialization 0.10.0, Retrofit 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rjcase committed Jan 31, 2019
1 parent f2d747c commit ff191e1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Add a converter factory when building your `Retrofit` instance using the
val contentType = MediaType.get("application/json")
val retrofit = Retrofit.Builder()
.baseUrl("https://example.com/")
.addConverterFactory(serializationConverterFactory(contentType, JSON))
.addConverterFactory(serializationConverterFactory(contentType, Json))
.build()
```

Expand All @@ -38,7 +38,7 @@ Download [the latest JAR][2] or grab via [Maven][3]:
```
or [Gradle][3]:
```groovy
compile 'com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.2.0'
implementation 'com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.2.0'
```

Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
Expand Down
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
buildscript {
ext.versions = [
'kotlin': '1.3.20'
]
repositories {
mavenCentral()
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0'
classpath 'org.jetbrains.kotlin:kotlin-serialization:1.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.kotlin:kotlin-serialization:${versions.kotlin}"
}
}

Expand All @@ -22,9 +25,9 @@ repositories {
}

dependencies {
api 'com.squareup.retrofit2:retrofit:2.4.0'
api 'org.jetbrains.kotlin:kotlin-stdlib:1.3.0'
api 'org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.9.0'
api 'com.squareup.retrofit2:retrofit:2.5.0'
api "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"
api 'org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.10.0'

testImplementation 'junit:junit:4.12'
testImplementation 'com.squareup.okhttp3:mockwebserver:3.11.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.jakewharton.retrofit2.converter.kotlinx.serialization

import kotlinx.serialization.Serializable
import kotlinx.serialization.json.JSON
import kotlinx.serialization.json.Json
import okhttp3.MediaType
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
Expand Down Expand Up @@ -32,7 +32,7 @@ class KotlinSerializationConverterFactoryStringTest {
val contentType = MediaType.get("application/json; charset=utf-8")
val retrofit = Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(serializationConverterFactory(contentType, JSON))
.addConverterFactory(serializationConverterFactory(contentType, Json))
.build()
service = retrofit.create(Service::class.java)
}
Expand Down

0 comments on commit ff191e1

Please sign in to comment.