Add Room KSP processor
This CL adds the symbol processing marker for Room such that KSP can
discover and run it.
Due to limitations of AndroidX plugin and KSP plugin, I cannot yet
enable KSP path in kotlin-test-app. Instead, I've added a new property
(useKsp) to use ksp instead of kapt in kotlin-test-app for local
debugging.
Right now, it passes all kotlin-testapp connected tests.
There is an existing problem in KSP where it might return some
FAKE_OVERRIDE methods which cause problems when calling asMemberOf on
them. I've added a reflective `isFake` check to filter out those
methods. Next version of KSP will not have that issue.
I've also added a simple script that clean compiles with both ksp and
kapt and compares times. It is not very accurate at this point but
total time spent in ksp tasks is ~50% less than kapt tasks :).
Bug: 160322705
Test: ./gradlew room:integration-tests:room-testapp-kotlin:assembleAndroidTest -PuseKsp=1
Change-Id: I06cf262d220377b4a648b60c6908d4fb6bff61b0
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index b2122db5..074020df 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -78,6 +78,8 @@
// dependencies that aren't used by buildSrc directly but that we resolve here so that the
// root project doesn't need to re-resolve them and their dependencies on every build
cacheableRuntimeOnly build_libs.hilt_plugin
+ // room kotlintestapp uses the ksp plugin but it does not publish a plugin marker yet
+ cacheableRuntimeOnly build_libs.kotlin.ksp_gradle_plugin
// dependencies whose resolutions we don't need to cache
compileOnly(findGradleKotlinDsl()) // Only one file in this configuration, no need to cache it
implementation project("jetpad-integration") // Doesn't have a .pom, so not slow to load