kapt.useBuildCache=true by default in kotlin 1.3.31?

I’m seeing an improvement in build times when I upgrade my project from kotlin 1.3.21 to 1.3.31. After running with Gradle build scans enabled, I can see that this improvement is largely due to the fact that tasks of type ‘KaptWithKotlincTask’ are now being cached by default. This is behavior that one had to previously opt into via:

kapt {
useBuildCache = true

yet I can find no documentation indicating that the behavior has changed. Is this new behavior intentional? Is kapt output now ‘safe’ to cache by default?

I see now that this was intentional:


However, it was not explicitly called out in the release notes:

Which was concerning to me because for months I’ve been reading that kapt caching is something you must explicitly opt into due to potential problems with annotation processors in general.

1 Like