Build issues with kotlin 2.1.20 version
:writing_hand: Describe the bug
After increase kotlin and ksp version to 2.1.20, project sync successfully, but fails during build. The reason is that trackEvent functions cannot be resolved.
In kotlin 2.1.20, the K2 implementation of the kapt compiler plugin is enabled by default. I am wondering if the unalignment of kapt compiler implementations is causing this issue.
stacktrace:
e: file:///Users/user/somepath//projectapp/src/main/java/com/example/project/ui/shared/views/PublicOptionsLayout.kt:77:21 Unresolved reference 'trackEvent'
:bomb: Steps to reproduce
- Increase kotlin version to 2.1.20 and ksp version to 2.1.20-1.0.31
- Build project
- See error
:wrench: Expected behavior
Project should build successfully, generating trackEvent functions and importing them without any errors.
:iphone: Tech info
- Android Studio version: Android Studio Meerkat | 2024.3.1
- kotlin version: 2.1.20
- ksp version: 2.1.20-1.0.31
- AGP version: 8.9.0
- gradle version: 8.11.1
- Collar version: 1.4.0
@thisAAY regarding the issue, I've noticed that Collar version 1.4.0 uses kotlin-inject v0.6.1, while support for KSP2 was added in v0.8.0. Updating Collar to this version might resolve the issue.
Will definitely check it, thanks