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

Commit

Permalink
Kotlin 1.9.0 & Serialization 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler authored and JakeWharton committed Aug 12, 2023
1 parent c03b221 commit ad9b8ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

buildscript {
ext.versions = [
'kotlin': '1.8.10',
'serialization': '1.5.0',
'kotlin': '1.9.0',
'serialization': '1.5.1',
]
repositories {
mavenCentral()
Expand Down Expand Up @@ -37,12 +40,12 @@ dependencies {
testImplementation "org.jetbrains.kotlinx:kotlinx-serialization-json:${versions.serialization}"
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile).configureEach { task ->
task.kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs += [
tasks.withType(KotlinJvmCompile).configureEach { task ->
task.compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
freeCompilerArgs.add(
'-Xjsr305=strict',
]
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ internal class SerializationStrategyConverter<T>(
private val saver: SerializationStrategy<T>,
private val serializer: Serializer
) : Converter<T, RequestBody> {
override fun convert(value: T) = serializer.toRequestBody(contentType, saver, value)
override fun convert(value: T & Any) = serializer.toRequestBody(contentType, saver, value)
}

0 comments on commit ad9b8ff

Please sign in to comment.