Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump kotlinpoet from 1.13.2 to 1.14.2 #234

Merged
merged 2 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,31 @@ import com.google.common.collect.SetMultimap
import com.squareup.kotlinpoet.DelicateKotlinPoetApi
import com.squareup.kotlinpoet.asTypeName
import com.squareup.kotlinpoet.asTypeVariableName
import com.squareup.kotlinpoet.metadata.*
import com.squareup.kotlinpoet.metadata.isAbstract
import com.squareup.kotlinpoet.metadata.isClass
import com.squareup.kotlinpoet.metadata.isCompanionObjectClass
import com.squareup.kotlinpoet.metadata.isEnumClass
import com.squareup.kotlinpoet.metadata.isInnerClass
import com.squareup.kotlinpoet.metadata.isInterface
import com.squareup.kotlinpoet.metadata.isInternal
import com.squareup.kotlinpoet.metadata.isLocal
import com.squareup.kotlinpoet.metadata.isObject
import com.squareup.kotlinpoet.metadata.isObjectClass
import com.squareup.kotlinpoet.metadata.isPublic
import com.squareup.kotlinpoet.metadata.isSealed
import com.squareup.moshi.JsonAdapter
import se.ansman.kotshi.*
import se.ansman.kotshi.Errors
import se.ansman.kotshi.Errors.abstractFactoriesAreDeprecated
import se.ansman.kotshi.model.*
import se.ansman.kotshi.ExperimentalKotshiApi
import se.ansman.kotshi.KotshiJsonAdapterFactory
import se.ansman.kotshi.RegisterJsonAdapter
import se.ansman.kotshi.constructors
import se.ansman.kotshi.model.GeneratedAdapter
import se.ansman.kotshi.model.GeneratedAnnotation
import se.ansman.kotshi.model.JsonAdapterFactory
import se.ansman.kotshi.model.JsonAdapterFactory.Companion.getManualAdapter
import se.ansman.kotshi.model.RegisteredAdapter
import se.ansman.kotshi.model.findKotshiConstructor
import se.ansman.kotshi.renderer.JsonAdapterFactoryRenderer
import javax.annotation.processing.Filer
import javax.annotation.processing.Messager
Expand Down Expand Up @@ -141,7 +160,7 @@ class FactoryProcessingStep(
) { name }
},
getJsonQualifiers = {
metadataAccessor.getTypeSpec(this).annotationSpecs.qualifiers(metadataAccessor)
metadataAccessor.getTypeSpec(this).annotations.qualifiers(metadataAccessor)
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class EnumAdapterGenerator(
fallback = targetTypeSpec.enumConstants
.entries
.filter { (_, constant) ->
constant.annotationSpecs.any { it.typeName == jsonDefaultValue }
constant.annotations.any { it.typeName == jsonDefaultValue }
}
.let { defaultValues ->
when (defaultValues.size) {
Expand All @@ -51,6 +51,6 @@ class EnumAdapterGenerator(
private fun Map.Entry<String, TypeSpec>.toEntry(): EnumJsonAdapter.Entry =
EnumJsonAdapter.Entry(
name = key,
serializedName = value.annotationSpecs.jsonName() ?: key
serializedName = value.annotations.jsonName() ?: key
)
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
kotlin = "1.8.21"
auto-service = "1.1.0"
kotlinpoet = "1.13.2"
kotlinpoet = "1.14.2"
compileTesting = "1.5.0"
incap = "1.0.0"
ksp = "1.8.21-1.0.11"
Expand Down
10 changes: 5 additions & 5 deletions tests/ksp/src/test/kotlin/se/ansman/kotshi/KspGeneratorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class KspGeneratorTest : BaseGeneratorTest() {

@OptIn(InternalKotshiApi::class)
internal object KotshiTestFactory : JsonAdapter.Factory {
public override fun create(
override fun create(
type: Type,
annotations: Set<Annotation>,
moshi: Moshi,
Expand Down Expand Up @@ -103,7 +103,7 @@ class KspGeneratorTest : BaseGeneratorTest() {

@OptIn(InternalKotshiApi::class)
internal object KotshiTestFactory : JsonAdapter.Factory {
public override fun create(
override fun create(
type: Type,
annotations: Set<Annotation>,
moshi: Moshi,
Expand Down Expand Up @@ -153,7 +153,7 @@ class KspGeneratorTest : BaseGeneratorTest() {

@OptIn(InternalKotshiApi::class)
internal object KotshiTestFactory : JsonAdapter.Factory {
public override fun create(
override fun create(
type: Type,
annotations: Set<Annotation>,
moshi: Moshi,
Expand Down Expand Up @@ -205,7 +205,7 @@ class KspGeneratorTest : BaseGeneratorTest() {

@OptIn(InternalKotshiApi::class)
internal object KotshiTestFactory : JsonAdapter.Factory {
public override fun create(
override fun create(
type: Type,
annotations: Set<Annotation>,
moshi: Moshi,
Expand Down Expand Up @@ -251,7 +251,7 @@ class KspGeneratorTest : BaseGeneratorTest() {

@OptIn(InternalKotshiApi::class)
internal object KotshiTestFactory : JsonAdapter.Factory {
public override fun create(
override fun create(
type: Type,
annotations: Set<Annotation>,
moshi: Moshi,
Expand Down