Any idea if I could reference ` ```compose.desktop...
# compose-desktop
n
Any idea if I could reference `
Copy code
compose.desktop.application.nativeDistributions.packageVersion
from my application’s Kotlin code? Hoping to do some concept of min-app communication with one of our Docker images and it would need us to pass along what version of the Compose application is being used from the application’s code itself
r
Assuming that's from the build script, you can use something like https://github.com/gmazzo/gradle-buildconfig-plugin
n
Ah excellent, I can have a common variable referenced from the DSL setting the packageVersion on the distributable and exposed via that BuildConfig. Thank you!
s
Thanks for the plugin. What i have seen is, the latest jpackage would automatically set the app version system property (
-Djpackage.app-version=1.2.3
). So it’s just a matter of reading it using
System.getProperty