Skip to content

Commit 540f67b

Browse files
slack-oss-botstagg
andauthored
Update ksp monorepo to v2.3.0 (#1591)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [com.google.devtools.ksp](https://goo.gle/ksp) ([source](https://redirect.github.com/google/ksp)) | plugin | minor | `2.2.20-2.0.4` -> `2.3.0` | | [com.google.devtools.ksp:symbol-processing-gradle-plugin](https://goo.gle/ksp) ([source](https://redirect.github.com/google/ksp)) | dependencies | minor | `2.2.20-2.0.4` -> `2.3.0` | --- ### Release Notes <details> <summary>google/ksp (com.google.devtools.ksp)</summary> ### [`v2.3.0`](https://redirect.github.com/google/ksp/releases/tag/2.3.0) [Compare Source](https://redirect.github.com/google/ksp/compare/2.2.20-2.0.4...2.3.0) ##### What's Changed - KSP1 has been deprecated[ #&#8203;2657](https://redirect.github.com/google/ksp/pull/2657) - KSP version is no longer tied to the Kotlin compiler version (moving away from the old <kotlinversion>-<kspversion> format). [#&#8203;2658](https://redirect.github.com/google/ksp/issues/2658) - KSP is no longer a compiler plugin (like KSP1). It now operates as a more standalone tool built on stable compiler APIs (shared with tools like IntelliJ). - KSP now has fewer limitations on the Kotlin version in use and allows the KSP team to provide better compatibility to KGP/AGP/Gradle - Read more about KSP2: https://github.com/google/ksp/blob/main/docs/ksp2.md ##### Reason for 2.3.0 version name: - It is independent of Kotlin now - We wanted to match the Kotlin language version - It is newer than the latest KSP 2.2.20-2.0.4 release. **Full Changelog**: google/ksp@2.2.20-2.0.4...2.3.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjQuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI2NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: Josh Stagg <[email protected]>
1 parent acd7058 commit 540f67b

File tree

5 files changed

+5
-18
lines changed

5 files changed

+5
-18
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jna = "5.18.1"
2626
kaml = "0.102.0"
2727
kotlin = "2.2.21"
2828
kotlinx-serialization = "1.9.0"
29-
ksp = "2.2.20-2.0.4"
29+
ksp = "2.3.0"
3030
kotlinPoet = "2.2.0"
3131
ktfmt = "0.59"
3232
markdown = "0.37.0"

platforms/gradle/foundry-gradle-plugin/src/main/kotlin/foundry/gradle/stats/ModuleStats.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package foundry.gradle.stats
1818
import app.cash.sqldelight.gradle.GenerateSchemaTask
1919
import app.cash.sqldelight.gradle.SqlDelightTask
2020
import com.android.build.api.variant.LibraryAndroidComponentsExtension
21-
import com.google.devtools.ksp.gradle.KspTask
21+
import com.google.devtools.ksp.gradle.KspAATask
2222
import com.squareup.moshi.JsonClass
2323
import com.squareup.wire.gradle.WireTask
2424
import foundry.common.convertProjectPathToAccessor
@@ -187,7 +187,7 @@ public object ModuleStatsTasks {
187187
}
188188
withPlugin("com.google.devtools.ksp") {
189189
addGeneratedSources()
190-
linkToLocTask { it.mustRunAfter(project.tasks.withType(KspTask::class.java)) }
190+
linkToLocTask { it.mustRunAfter(project.tasks.withType(KspAATask::class.java)) }
191191
}
192192
withPlugin("com.squareup.wire") {
193193
addGeneratedSources()

platforms/gradle/foundry-gradle-plugin/src/main/kotlin/foundry/gradle/tasks/TaskExtensions.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package foundry.gradle.tasks
1818
import app.cash.sqldelight.gradle.SqlDelightTask
1919
import com.android.build.gradle.internal.tasks.databinding.DataBindingGenBaseClassesTask
2020
import com.google.devtools.ksp.gradle.KspAATask
21-
import com.google.devtools.ksp.gradle.KspTask
2221
import com.squareup.wire.gradle.WireTask
2322
import org.gradle.api.Project
2423
import org.gradle.api.tasks.TaskProvider
@@ -47,10 +46,7 @@ internal fun TaskProvider<*>.dependsOnSourceGeneratingTasks(
4746

4847
// KSP
4948
project.pluginManager.withPlugin("com.google.devtools.ksp") {
50-
configure {
51-
dependsOn(project.tasks.withType(KspTask::class.java))
52-
dependsOn(project.tasks.withType(KspAATask::class.java))
53-
}
49+
configure { dependsOn(project.tasks.withType(KspAATask::class.java)) }
5450
}
5551

5652
// ViewBinding

platforms/gradle/foundry-gradle-plugin/src/main/kotlin/foundry/gradle/util/KspUtil.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package foundry.gradle.util
1717

1818
import com.google.devtools.ksp.gradle.KspAATask
19-
import com.google.devtools.ksp.gradle.KspTaskJvm
2019
import org.gradle.api.Project
2120
import org.gradle.api.provider.Provider
2221
import org.gradle.api.tasks.TaskProvider
@@ -30,10 +29,6 @@ internal fun <T : Any> Project.addKspSource(
3029
.named { it == kspTaskName }
3130
.configureEach {
3231
when (this) {
33-
is KspTaskJvm -> {
34-
source(provider)
35-
dependsOn(task)
36-
}
3732
is KspAATask -> {
3833
kspConfig.javaSourceRoots.from(provider)
3934
dependsOn(task)

platforms/gradle/foundry-gradle-plugin/src/main/kotlin/foundry/gradle/util/kgpUtil.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package foundry.gradle.util
1717

18-
import com.google.devtools.ksp.gradle.KspTask
1918
import org.gradle.api.tasks.TaskContainer
2019
import org.jetbrains.kotlin.gradle.internal.KaptGenerateStubsTask
2120
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
@@ -31,17 +30,14 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3130
*/
3231
internal fun TaskContainer.configureKotlinCompilationTask(
3332
includeKaptGenerateStubsTask: Boolean = false,
34-
includeKspTask: Boolean = false,
3533
action: KotlinCompilationTask<*>.() -> Unit,
3634
) {
3735
withType(KotlinCompilationTask::class.java).configureEach {
3836
// Kapt stub gen is a special case because KGP sets it up to copy compiler args from the
3937
// standard kotlin compilation, which can lead to duplicates. SOOOO we skip configuration of
4038
// it here. Callers to this _can_ opt in to including it, but they must be explicit.
4139
if (includeKaptGenerateStubsTask || this !is KaptGenerateStubsTask) {
42-
if (includeKspTask || this !is KspTask) {
43-
action()
44-
}
40+
action()
4541
}
4642
}
4743
}

0 commit comments

Comments
 (0)