Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move away from Databinding to be able to use KSP? #144

Open
johan12345 opened this issue Nov 1, 2021 · 1 comment
Open

Move away from Databinding to be able to use KSP? #144

johan12345 opened this issue Nov 1, 2021 · 1 comment

Comments

@johan12345
Copy link
Collaborator

johan12345 commented Nov 1, 2021

Apparently there is a replacement for Kotlin Annotation Processing (KAPT) called Kotlin Symbol Processing (KSP) that significantly speeds up build times. The libraries we are using in EVMap that need annotation processing, Moshi and Room, have already been ported to KSP.

The only thing that is preventing us from using KSP currently is Android Databinding, which still requires KAPT. According to some comments on Reddit, there are no plans to port Databinding to KSP, though I have found no official source for that.

So maybe we need to move away from databinding to be able to switch to KSP? Most of the app already uses ViewModels, so it should not be too complicated to switch to simple ViewBinding + manual code for connecting the ViewModels and Views. But still, it will be a significant effort, so not sure if the gain in build performance is worth it.

@dbrgn
Copy link
Contributor

dbrgn commented Feb 20, 2022

As a sidenote, I've taken a look at a Jetpack Compose for another app I'm maintaining, and I have to say, it's really awesome. (I don't like databinding, to be honest.)

It may require re-architecting some activities to achieve a fully Compose-based UI, but that's probably worth it. It's also possible to mix Compose-based and View-based code for easier step-by-step integration: https://developer.android.com/jetpack/compose/interop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants