Skip to content

Commit

Permalink
Update kotlinpoet to v1.15.3
Browse files Browse the repository at this point in the history
`resolve()` assisted constructor parameter types before creating their assisted keys. This was the default behavior in KotlinPoet 1.14.x. The function parameters are resolved by default. If the constructor parameters aren't, it results in mismatches like `KFunction1<String, Int>` for the function but `(String) -> Int` for the constructor.
  • Loading branch information
renovate[bot] authored and JoelWilcox committed Dec 27, 2023
1 parent a3a1213 commit c952a46
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
8 changes: 4 additions & 4 deletions compiler-utils/dependencies/runtimeClasspath.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
com.google.dagger:dagger:2.46.1
com.squareup:kotlinpoet:1.14.2
com.squareup:kotlinpoet-jvm:1.15.3
com.squareup:kotlinpoet:1.15.3
javax.inject:javax.inject:1
org.jetbrains.intellij.deps:trove4j:1.0.20200330
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.10
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.9.10
org.jetbrains.kotlin:kotlin-reflect:1.8.21
org.jetbrains.kotlin:kotlin-reflect:1.9.21
org.jetbrains.kotlin:kotlin-script-runtime:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
org.jetbrains.kotlin:kotlin-stdlib:1.9.10
org.jetbrains.kotlin:kotlin-stdlib:1.9.21
org.jetbrains:annotations:13.0
10 changes: 5 additions & 5 deletions compiler/dependencies/runtimeClasspath.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
com.google.dagger:dagger:2.46.1
com.squareup:kotlinpoet-ksp:1.14.2
com.squareup:kotlinpoet:1.14.2
com.squareup:kotlinpoet-jvm:1.15.3
com.squareup:kotlinpoet-ksp:1.15.3
com.squareup:kotlinpoet:1.15.3
javax.annotation:jsr250-api:1.0
javax.inject:javax.inject:1
org.jetbrains.intellij.deps:trove4j:1.0.20200330
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.10
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.9.10
org.jetbrains.kotlin:kotlin-reflect:1.8.21
org.jetbrains.kotlin:kotlin-reflect:1.9.21
org.jetbrains.kotlin:kotlin-script-runtime:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
org.jetbrains.kotlin:kotlin-stdlib:1.9.10
org.jetbrains.kotlin:kotlin-stdlib:1.9.21
org.jetbrains:annotations:13.0
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import com.squareup.anvil.compiler.codegen.dagger.AssistedFactoryCodeGen.KspGene
import com.squareup.anvil.compiler.codegen.ksp.AnvilSymbolProcessor
import com.squareup.anvil.compiler.codegen.ksp.AnvilSymbolProcessorProvider
import com.squareup.anvil.compiler.codegen.ksp.KspAnvilException
import com.squareup.anvil.compiler.codegen.ksp.argumentAt
import com.squareup.anvil.compiler.codegen.ksp.isAnnotationPresent
import com.squareup.anvil.compiler.codegen.ksp.isInterface
import com.squareup.anvil.compiler.codegen.ksp.resolveKSClassDeclaration
Expand Down Expand Up @@ -143,7 +142,7 @@ object AssistedFactoryCodeGen : AnvilApplicabilityChecker {
// Compute for each parameter its key.
val functionParameterKeys = function.parameterKeys
val assistedParameterKeys = assistedParameters.map {
it.toAssistedParameterKey(it.type.toTypeName(typeParameterResolver))
it.toAssistedParameterKey(it.type.resolve().toTypeName(typeParameterResolver))
}

// The factory function may not have two or more parameters with the same key.
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kct = "0.3.1"
kgx = "0.1.9"
kotlin = "1.9.10"
kotlinx-binaryCompatibility = "0.13.2"
kotlinpoet = "1.14.2"
kotlinpoet = "1.15.3"
# If updating KSP version, we currently have ksp override logic in settings.gradle that needs to be updated too
ksp = "1.9.10-1.0.13"
ktlint = "1.0.1"
Expand Down

0 comments on commit c952a46

Please sign in to comment.