mirror of
https://github.com/fankes/moshi.git
synced 2025-10-20 08:29:22 +08:00
Update to Kotlin 1.5 (and associated deps) (#1339)
This commit is contained in:
@@ -22,7 +22,7 @@ plugins {
|
||||
kotlin("jvm")
|
||||
kotlin("kapt")
|
||||
id("com.vanniktech.maven.publish")
|
||||
id("com.github.johnrengelman.shadow") version "6.0.0"
|
||||
id("com.github.johnrengelman.shadow") version "7.0.0"
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
@@ -102,6 +102,6 @@ val shadowJar = tasks.shadowJar.apply {
|
||||
}
|
||||
|
||||
artifacts {
|
||||
runtime(shadowJar)
|
||||
runtimeOnly(shadowJar)
|
||||
archives(shadowJar)
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@ import com.squareup.kotlinpoet.asClassName
|
||||
import com.squareup.kotlinpoet.asTypeName
|
||||
import com.squareup.moshi.JsonAdapter
|
||||
import com.squareup.moshi.Types
|
||||
import java.util.Locale
|
||||
|
||||
/** A JsonAdapter that can be used to encode and decode a particular field. */
|
||||
internal data class DelegateKey(
|
||||
@@ -50,7 +51,7 @@ internal data class DelegateKey(
|
||||
"At${it.typeName.rawType().simpleName}"
|
||||
}
|
||||
val adapterName = nameAllocator.newName(
|
||||
"${type.toVariableName().decapitalize()}${qualifierNames}Adapter",
|
||||
"${type.toVariableName().replaceFirstChar { it.lowercase(Locale.US) }}${qualifierNames}Adapter",
|
||||
this
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user