I know it's possible to set the version in build.gradle
→ nativeDistributions.packageVersion
...
but how does one read that version in the source code of the app, for example to print it in the application
composable?
On macOs the about screen is available when opening the distributable app, and it shows the version we set via build.gradle
:
nativeDistributions
withargs += listOf("-v=${rootProject.version}",)
and using that in release builds. – Bloodstain