Update KSP to beta01 and KCT to 1.4.1
* KSP beta01 introduces an api change in function overrides where it can
handle cases when a java method overrides a kotlin property. This also
means the return type of `KSFunction.findOverridee` is a KSDeclaration
instead of KSFunction. We use this when resolving types so I've updated
Room to expect a property declaration as well. It was also affecting
override variance resolution but that code only ever runs for kotlin
sources so it was not necessary to handle property overrides there.
* Adding more tests to java overriding kotlin property revelated another
bug where we were setting an invalid parameter name for property setter
values. (<set-?>). That name is valid in byte code but not in source
code. I've updated JavacVariableElement and KotlinSynthetic to use a
sanitized name instead. We could've done it while generating code but
since many other things refer to these parameters, it is safer to do it
while parsing parameters and hide the detail from the rest of the
processing.
* One of the new tests I've added hit a bug in KSP that revelated after
KSP fixed "java method overrides kotlin property" case. Added a try
catch helper for it:
https://github.com/google/ksp/issues/462
* Previously, when listing methods in a kotlin class, we always listed
setters before getters which made the source code match tests slightly
more difficult. Changed it to keep setter/getter of a property together
in the methods list.
* KSP changed its processor provider interface, updated Room
accordingly. (it now receives 1 container object instead of multiple
parameters)
Bug: 160322705
Test: existing tests + more tests for overrides
Change-Id: I92ec446b59cdeccc37bd91308d1a20acf3fe959a
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 5493c52..b46dca2 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -21,9 +21,9 @@
hilt = "2.36"
incap = "0.2"
kotlin = "1.5.10"
-kotlinCompileTesting = "1.4.0"
+kotlinCompileTesting = "1.4.1"
kotlinCoroutines = "1.4.3"
-ksp = "1.5.0-1.0.0-alpha10"
+ksp = "1.5.10-1.0.0-beta01"
leakcanary = "2.2"
mockito = "2.25.0"
sqldelight = "1.3.0"