CMP-Unit-Converter

Introduction: A Compose Multiplatform unit converter
More: Author   ReportBugs   
Tags:

This repo contains a real-world example of a Compose Multiplatform app. CMP Unit Converter runs on Android, iOS, and the Desktop. As its name suggests, you can convert between various units and scales. While this may provide some value, the main goal of the app and the accompanying series on dev.to is to show how to use Compose Multiplatform and a couple of other multiplatform libraries while focusing on platform integration.

Among others, these libraries are used:

Unlike many other samples, this one has a strong focus on platform integration. For example, on the Desktop, you can access the settings, the About dialog, and all top-level destinations from the menu bar. On Android and iOS, a top app bar is used. The app supports dark and light mode on all platforms. Database and configuration files are stored in the preferred locations.

What's up next?

  • Regularly updating dependencies

Note to myself ;-)

The project contains a few workarounds to make the build smooth across platforms and targets. We should occasionally check if the workarounds are still necessary.

  • Fix java.lang.NoClassDefFoundError: sun/misc/Unsafe by adding
modules("jdk.unsupported")
modules("jdk.unsupported.desktop")
  • Fix could not resolve all files for configuration ':kotlinNativeBundleConfiguration' on Linux on ARM by adding
if (!System.getProperty("os.name").lowercase().contains("linux"))
  • Refine rules.pro

While this preliminary version seems to work, it needs some more love for sure

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools