oleksandrbalan / minabox

Lazy box library for Jetpack Compose, which allows to display lazy loaded items on the 2D plane.
Apache License 2.0
292 stars 18 forks source link

Compose Multiplatform Support #4

Closed joshafeinberg closed 1 year ago

joshafeinberg commented 1 year ago

First run so still have some stuff to clean up

Migrates minabox to a compose multiplatform library with JVM and Android targets Migrates demo module to a multiplatform library with JVM and Android targets Moves old demo to androiddemo and creates desktopdemo. Both demos call the App composable from demo so they share a lot of code. There are specific items related to android that needed to remain there such as status bar padding and RoundedPolygon

Note that this also required a downgrade of kotlin and compose

Still to do [X] Clean up code and run linters [X] Convert new dependencies and plugins to use the toml file [X] Ensure publishing works with multi-module

oleksandrbalan commented 1 year ago

A lot of thx for your time and this PR 🤗

As I have almost zero experience with Compose multiplatform I would like to ask a few dummy questions:

joshafeinberg commented 1 year ago

A lot of thx for your time and this PR 🤗

As I have almost zero experience with Compose multiplatform I would like to ask a few dummy questions:

  • Compose version is still driven by BOM?

No, it doesn't appear that Compose Multiplatform uses the BOM

  • Is it possible to move M3 dependency from minabox to demo? I would like to not force M2 or M3 from minabox

Done

  • Why do you need to change java-sourceCompatibility / java-targetCompatibility? Will 17 be OK for older Android versions?

Turns out I didn't, I just needed to manually set the JVM target for the projects back to 1.8

  • Does release artifact must / should be changed? Or current "io.github.oleksandrbalan:minabox" will work fine for both targets?

It will work fine, behind the scenes it actually deploys four packages, minabox, minabox-android, minabox-android-debug, and minabox-jvm. Gradle will auto-resolve to whichever one is needed