What’s New

Kotlin Symbol Processing

Developer Tools

Kotlin's annotation-processing API — what Room and its neighbours generate code through.

Latest 2.3.10 · by GoogleWebsitegoogle/ksp

Changelog

2.3.10

Added 2
  • Include kotlinx.coroutines in the distributed uber jar symbol-processing-aa-embeddable
  • New debugging features for incremental compilation, including additional logging and dependency graph visualization
Changed 1
  • Memoized hash code for KSTypeImpl to speed up processing
Fixed 10
  • Fix OOMs caused by unstopped coroutine Dispatcher threads by moving KSP task cache to a gradle build service
  • Sanitize ':' in internal-name module suffix so KSP works with Kotlin 2.4.0 default module names
  • Filter source file trees in KspAATask to restore NO-SOURCE skipping behaviour
  • Fix R-class resolution in KSP when AGP 9 built-in Kotlin is enabled
  • Fix KSP2 incremental cache path normalization mismatch
  • Normalize line endings for KspAATask source roots to prevent cross-platform remote build cache misses
Deprecated 1
  • Deprecate the ksp(...) Gradle configuration in Kotlin Multiplatform (KMP) projects in favor of target-specific configurations
What's Changed
  • Fix OOMs caused by unstopped coroutine Dispatcher threads by moving KSP task cache to a gradle build service (#2817)
  • Sanitize ':' in internal-name module suffix so KSP works with Kotlin 2.4.0 default module names (#2964)
  • Filter source file trees in KspAATask to restore NO-SOURCE skipping behaviour (#2947)
  • Fix R-class resolution in KSP when AGP 9 built-in Kotlin is enabled (#2857)
  • Fix KSP2 incremental cache path normalization mismatch (#2854)
  • Normalize line endings for KspAATask source roots to prevent cross-platform remote build cache misses (#2849)
  • Fix bug where KSP incremental compilation does not consider library class references in annotations (#3011)
  • Consume all Kotlin sources in KSP to support other code generators (#3001)
  • Fix configuration cache invalidation in klib cross-compilation check (#3014)
  • Memoized hash code for KSTypeImpl to speed up processing (#2896)
  • Fix incorrect name generation for data classes annotated with @JvmRecord (#2813)
  • Include kotlinx.coroutines in the distributed uber jar symbol-processing-aa-embeddable (#2938)
  • New debugging features for incremental compilation, including additional logging and dependency graph visualization (#3015)
  • Deprecate the ksp(...) Gradle configuration in Kotlin Multiplatform (KMP) projects in favor of target-specific configurations (#2956). Note: Non-KMP projects are also affected. For migration details, see the documentation.
Contributors
  • Thanks to @mvanhorn, @Yong-yuan-X, @MariusVolkhart, @shmuelr and everyone who reported bugs and participated in discussions!

Full Changelog: https://github.com/google/ksp/compare/2.3.9...2.3.10

2.3.9

What's Changed
  • Cleaned up native cross-compilation support checks to prevent Gradle Configuration Cache invalidation (#2953)
  • Fixed a compilation performance regression in in PsiResolutionStrategy introduced in 2.3.8 (#2948)
Contributors
  • Thanks to everyone who reported bugs and participated in discussions!

Full Changelog: https://github.com/google/ksp/compare/2.3.8...2.3.9

2.3.8

What's Changed
  • Enabled new default annotation use-site rules in Kotlin's Analysis API (see KEEP 402) for more information. Note: KSP was already mostly compatible with KEEP 402, so there shouldn't be any visible changes for users. (#2888)
  • Enabled ksp.project.isolation by default when Gradle isolated projects are enabled (#2866)
  • Improved getSymbolsWithAnnotation performance by implementing a new PSI-based resolution strategy (#2816)
Contributors
  • Thanks to @hugoncosta and everyone who reported bugs and participated in discussions!

Full Changelog: https://github.com/google/ksp/compare/2.3.7...2.3.8

2.3.6

What's Changed
  • Fixed an issue where module recompilation would fail on Windows environments when KSP2 was enabled (#2774)
  • Resolved an issue where generated Java sources were ignored when using Android Kotlin Multiplatform with IP-compatible paths (#2744)
  • Fixed a KSP version 2.3.5 CI error exception that does not break build checks (#2763)
  • Added symbol-processing-api and common-deps to compile dependencies (#2789)
  • Improved the detection of built-in Kotlin by removing the reliance on KotlinBaseApiPlugin (#2772)
  • A back-port of a performance optimization in the Intellij / Analysis API (2785 )
  • Added support for nested typealias Kotlin language feature #2588
  • Exclude jdbc package from log4j to prevent vulnerability issue #2651
Contributors
  • Thanks to @salmanmkc, @jaschdoc, @gurusai-voleti and everyone who reported bugs and participated in discussions!

Full Changelog: https://github.com/google/ksp/compare/2.3.5...2.3.6

2.3.5

What's Changed
  • KSPCoreEnvironment.instance_prop leaks memory when used programmatically #2742
  • Missing first annotation argument when toByte is used #2672
  • Fix circular dependency between KSP and KAPT in AGP 9.0 #2743
Contributors
  • Thanks to everyone who reported bugs and participated in discussions!

Full Changelog: https://github.com/google/ksp/compare/2.3.4...2.3.5

2.3.4

What's Changed
  • KSP ignores sources in Kotlin directory #2730
  • Avoid recording Java symbol lookups in non-incremental builds #2728
  • Clean up ThreadLocals when processing is done #2709
Contributors
  • Thanks to everyone who reported bugs and participated in discussions!

Full Changelog: https://github.com/google/ksp/compare/2.3.3...2.3.4

2.3.2

What's Changed

Note: This release is a hotfix for a regression introduced in 2.3.1

  • Fixed an issue where KSP incorrectly processed specific nullable annotations from Java interfaces, leading to incorrect nullability in the generated Kotlin code #2696
  • Fixed a regression introduced in #2656 that caused runtime failures for projects using AGP 8.8.0 and older due to an incompatible, version-specific type check. #2694
Contributors

Thanks to everyone who reported bugs and participated in discussions!

Full Changelog: https://github.com/google/ksp/compare/2.3.1...2.3.2

Discussion