Closed jbruchanov closed 1 year ago
ConstraintLayout/MotionLayout Views version is java for APK size. 90+ % of our users are Views based, and some care deeply about APK size for development on Low end devices. We have had request to reduce it from its current sub 50K impact on APK.
All functionality for ConstraintLayout/MotionLayout is in Core and shared between Views and Compose. If we created a Kotlin version of Core we would fork the implementations. Core is still under active development for both Views and Compose use.
We are looking at modifying our use of Java features not compatible with Kotlin to smooth the fork of Core in the future.
Is there any plan to update the CL to have it supported also for compose multiplatform ?
I've done a quick overview of the repo and seems to be quite big task given the fact that the
core
as acompose
dependency is a module written mostly, if not at all, in java.Could please authors/owners here elaborate little bit what needs to be done to have it compose multiplatform compatible?
I'd like to contribute and I believe based on comments on stack overflow and kotlin slack, I'm not only one from community who would appreciate it and help to achieve this task.
So far few points/observations:
core
ascompose
dependency is written in java and probably needs to be converted to kt. (I've tried simply to use java->kt convertor in IDE and it's far from anything smooth, specially due to nullability types). Naive conversion is doable with some confidence having a lot of unit tests around thoughjava.net
,org.json
which seem to be just tools/debug convenient code for testing, not for the CL itself)Handler
,Looper
,Log
)list of obvious imports what needs to be taken care of (basically all imports in the core/compose excluding
androidx.compose.*
,kotlin.math.*
,kotlinx.coroutines.*
,androidx.annotation.*
)) which doesn't seem to be too bad