-
Notifications
You must be signed in to change notification settings - Fork 171
Support for compose multiplatform #807
Description
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 a compose
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 though- replace any java deps by kt alternatives (mostly collections), there are few unexpected imports like
java.net
,org.json
which seem to be just tools/debug convenient code for testing, not for the CL itself) - abstract/refactor code using any android specific deps (
Handler
,Looper
,Log
) - there is 500 unittests in core which can help to avoid any breaks
- maybe split of motion layout vs constraint layout in terms of work would help for start, I believe that usage of CL is far more common comparing to MotionLayout part
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
android.annotation.SuppressLint
android.graphics.Canvas
android.graphics.DashPathEffect
android.graphics.Matrix
android.graphics.Paint
android.graphics.Path
android.graphics.Rect
android.os.Handler
android.os.Looper
android.util.Log
java.io.IOException
java.io.OutputStream
java.lang.ref.WeakReference
java.net.Socket
java.text.DecimalFormat
java.util.ArrayList
java.util.Arrays
java.util.Collection
java.util.Collections
java.util.Comparator
java.util.EnumSet
java.util.HashMap
java.util.HashSet
java.util.Iterator
java.util.LinkedHashMap
java.util.List
java.util.Locale
java.util.Map
java.util.Objects
java.util.Set
kotlin.coroutines.coroutineContext
kotlin.properties.ObservableProperty
kotlin.reflect.KProperty
org.intellij.lang.annotations.Language
org.json.JSONArray
org.json.JSONObject