Upgrade to Kotlin 1.5.0, KSP to 1.5.0-1.0.0-alpha09
Test: bos

Change-Id: I5a247876c9a964f59f5e0feb5b87a5d810bf3f18
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index deed960..57adec7 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -9,7 +9,8 @@
     }
 
     dependencies {
-        classpath libs.kotlinGradlePlugin
+        classpath(libs.kotlinGradlePlugin)
+        classpath(libs.kgpLeakPatcher) // KT-46368
     }
 
     configurations.classpath.resolutionStrategy {
@@ -41,7 +42,10 @@
                     "-Xskip-runtime-version-check",
                     "-Xskip-metadata-version-check",
                     // Allow `@OptIn` and `@UseExperimental`
-                    "-Xopt-in=kotlin.RequiresOptIn"
+                    "-Xopt-in=kotlin.RequiresOptIn",
+                    // Issue where sam conversion in gradle's kts file causes task-out-of-date
+                    // Details: KT-46445 and https://github.com/gradle/gradle/issues/17052
+                    "-Xsam-conversions=class"
             ]
         }
     }
@@ -75,13 +79,15 @@
     // root project doesn't need to re-resolve them and their dependencies on every build
     cacheableRuntimeOnly(libs.hiltAndroidGradlePlugin)
     // room kotlintestapp uses the ksp plugin but it does not publish a plugin marker yet
-    cacheableRuntimeOnly(libs.kspGradlePlugin)
+    cacheableApi(libs.kspGradlePlugin)
+    cacheableApi(libs.kgpLeakPatcher)
     // 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
 }
 
 apply plugin: "java-gradle-plugin"
+apply plugin: "dev.zacsweers.kgp-150-leak-patcher"
 
 sourceSets {
     main.java.srcDirs += "${supportRootFolder}/benchmark/gradle-plugin/src/main/kotlin"